Class: FdxV660Api::TimeframeBasedLimitsForAPaymentNetwork1
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::TimeframeBasedLimitsForAPaymentNetwork1
- Defined in:
- lib/fdx_v660_api/models/timeframe_based_limits_for_a_payment_network1.rb
Overview
The transfer limits for the current week
Instance Attribute Summary collapse
-
#max_occurrence ⇒ Integer
Maximum number of transfers that can be made in this direction for this timeframe.
-
#remaining_occurrence ⇒ Integer
Remaining number of transfers that can be made in this direction for this timeframe.
-
#resets_on ⇒ DateTime
Date/time at which this timeframe will reset next.
-
#transfer_max_amount ⇒ Float
Maximum limit of funds that can be transferred to/from the account in this timeframe.
-
#transfer_remaining_amount ⇒ Float
Remaining value of the maximum limit of funds that can be transferred to/from the account in this timeframe.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(resets_on: SKIP, transfer_max_amount: SKIP, transfer_remaining_amount: SKIP, max_occurrence: SKIP, remaining_occurrence: SKIP, additional_properties: nil) ⇒ TimeframeBasedLimitsForAPaymentNetwork1
constructor
A new instance of TimeframeBasedLimitsForAPaymentNetwork1.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_resets_on ⇒ Object
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(resets_on: SKIP, transfer_max_amount: SKIP, transfer_remaining_amount: SKIP, max_occurrence: SKIP, remaining_occurrence: SKIP, additional_properties: nil) ⇒ TimeframeBasedLimitsForAPaymentNetwork1
Returns a new instance of TimeframeBasedLimitsForAPaymentNetwork1.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/fdx_v660_api/models/timeframe_based_limits_for_a_payment_network1.rb', line 64 def initialize(resets_on: SKIP, transfer_max_amount: SKIP, transfer_remaining_amount: SKIP, max_occurrence: SKIP, remaining_occurrence: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @resets_on = resets_on unless resets_on == SKIP @transfer_max_amount = transfer_max_amount unless transfer_max_amount == SKIP unless transfer_remaining_amount == SKIP @transfer_remaining_amount = transfer_remaining_amount end @max_occurrence = max_occurrence unless max_occurrence == SKIP @remaining_occurrence = remaining_occurrence unless remaining_occurrence == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#max_occurrence ⇒ Integer
Maximum number of transfers that can be made in this direction for this timeframe
30 31 32 |
# File 'lib/fdx_v660_api/models/timeframe_based_limits_for_a_payment_network1.rb', line 30 def max_occurrence @max_occurrence end |
#remaining_occurrence ⇒ Integer
Remaining number of transfers that can be made in this direction for this timeframe
35 36 37 |
# File 'lib/fdx_v660_api/models/timeframe_based_limits_for_a_payment_network1.rb', line 35 def remaining_occurrence @remaining_occurrence end |
#resets_on ⇒ DateTime
Date/time at which this timeframe will reset next
15 16 17 |
# File 'lib/fdx_v660_api/models/timeframe_based_limits_for_a_payment_network1.rb', line 15 def resets_on @resets_on end |
#transfer_max_amount ⇒ Float
Maximum limit of funds that can be transferred to/from the account in this timeframe
20 21 22 |
# File 'lib/fdx_v660_api/models/timeframe_based_limits_for_a_payment_network1.rb', line 20 def transfer_max_amount @transfer_max_amount end |
#transfer_remaining_amount ⇒ Float
Remaining value of the maximum limit of funds that can be transferred to/from the account in this timeframe
25 26 27 |
# File 'lib/fdx_v660_api/models/timeframe_based_limits_for_a_payment_network1.rb', line 25 def transfer_remaining_amount @transfer_remaining_amount end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/fdx_v660_api/models/timeframe_based_limits_for_a_payment_network1.rb', line 82 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. resets_on = if hash.key?('resetsOn') (DateTimeHelper.from_rfc3339(hash['resetsOn']) if hash['resetsOn']) else SKIP end transfer_max_amount = hash.key?('transferMaxAmount') ? hash['transferMaxAmount'] : SKIP transfer_remaining_amount = hash.key?('transferRemainingAmount') ? hash['transferRemainingAmount'] : SKIP max_occurrence = hash.key?('maxOccurrence') ? hash['maxOccurrence'] : SKIP remaining_occurrence = hash.key?('remainingOccurrence') ? hash['remainingOccurrence'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. TimeframeBasedLimitsForAPaymentNetwork1.new(resets_on: resets_on, transfer_max_amount: transfer_max_amount, transfer_remaining_amount: transfer_remaining_amount, max_occurrence: max_occurrence, remaining_occurrence: remaining_occurrence, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 44 45 46 |
# File 'lib/fdx_v660_api/models/timeframe_based_limits_for_a_payment_network1.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['resets_on'] = 'resetsOn' @_hash['transfer_max_amount'] = 'transferMaxAmount' @_hash['transfer_remaining_amount'] = 'transferRemainingAmount' @_hash['max_occurrence'] = 'maxOccurrence' @_hash['remaining_occurrence'] = 'remainingOccurrence' @_hash end |
.nullables ⇒ Object
An array for nullable fields
60 61 62 |
# File 'lib/fdx_v660_api/models/timeframe_based_limits_for_a_payment_network1.rb', line 60 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 57 |
# File 'lib/fdx_v660_api/models/timeframe_based_limits_for_a_payment_network1.rb', line 49 def self.optionals %w[ resets_on transfer_max_amount transfer_remaining_amount max_occurrence remaining_occurrence ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
129 130 131 132 133 134 135 136 |
# File 'lib/fdx_v660_api/models/timeframe_based_limits_for_a_payment_network1.rb', line 129 def inspect class_name = self.class.name.split('::').last "<#{class_name} resets_on: #{@resets_on.inspect}, transfer_max_amount:"\ " #{@transfer_max_amount.inspect}, transfer_remaining_amount:"\ " #{@transfer_remaining_amount.inspect}, max_occurrence: #{@max_occurrence.inspect},"\ " remaining_occurrence: #{@remaining_occurrence.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_custom_resets_on ⇒ Object
115 116 117 |
# File 'lib/fdx_v660_api/models/timeframe_based_limits_for_a_payment_network1.rb', line 115 def to_custom_resets_on DateTimeHelper.to_rfc3339(resets_on) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
120 121 122 123 124 125 126 |
# File 'lib/fdx_v660_api/models/timeframe_based_limits_for_a_payment_network1.rb', line 120 def to_s class_name = self.class.name.split('::').last "<#{class_name} resets_on: #{@resets_on}, transfer_max_amount: #{@transfer_max_amount},"\ " transfer_remaining_amount: #{@transfer_remaining_amount}, max_occurrence:"\ " #{@max_occurrence}, remaining_occurrence: #{@remaining_occurrence}, additional_properties:"\ " #{@additional_properties}>" end |