Class: FdxV660Api::TimeAndOccurrenceBasedTransferLimits
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::TimeAndOccurrenceBasedTransferLimits
- Defined in:
- lib/fdx_v660_api/models/time_and_occurrence_based_transfer_limits.rb
Overview
The transfer amount limits for each timeframe or occurrence
Instance Attribute Summary collapse
-
#day ⇒ TimeframeBasedLimitsForAPaymentNetwork5
The transfer limits for the current day.
-
#month ⇒ TimeframeBasedLimitsForAPaymentNetwork2
The transfer limits for the current month.
-
#transaction ⇒ OccurrenceBasedLimitsForAPaymentNetwork2
The transfer limits taking effect from all the timeframe limits.
-
#week ⇒ TimeframeBasedLimitsForAPaymentNetwork1
The transfer limits for the current week.
-
#year ⇒ TimeframeBasedLimitsForAPaymentNetwork3
The transfer limits for the current year.
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(day: SKIP, week: SKIP, month: SKIP, year: SKIP, transaction: SKIP, additional_properties: nil) ⇒ TimeAndOccurrenceBasedTransferLimits
constructor
A new instance of TimeAndOccurrenceBasedTransferLimits.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#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(day: SKIP, week: SKIP, month: SKIP, year: SKIP, transaction: SKIP, additional_properties: nil) ⇒ TimeAndOccurrenceBasedTransferLimits
Returns a new instance of TimeAndOccurrenceBasedTransferLimits.
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/fdx_v660_api/models/time_and_occurrence_based_transfer_limits.rb', line 59 def initialize(day: SKIP, week: SKIP, month: SKIP, year: SKIP, transaction: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @day = day unless day == SKIP @week = week unless week == SKIP @month = month unless month == SKIP @year = year unless year == SKIP @transaction = transaction unless transaction == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#day ⇒ TimeframeBasedLimitsForAPaymentNetwork5
The transfer limits for the current day
14 15 16 |
# File 'lib/fdx_v660_api/models/time_and_occurrence_based_transfer_limits.rb', line 14 def day @day end |
#month ⇒ TimeframeBasedLimitsForAPaymentNetwork2
The transfer limits for the current month
22 23 24 |
# File 'lib/fdx_v660_api/models/time_and_occurrence_based_transfer_limits.rb', line 22 def month @month end |
#transaction ⇒ OccurrenceBasedLimitsForAPaymentNetwork2
The transfer limits taking effect from all the timeframe limits
30 31 32 |
# File 'lib/fdx_v660_api/models/time_and_occurrence_based_transfer_limits.rb', line 30 def transaction @transaction end |
#week ⇒ TimeframeBasedLimitsForAPaymentNetwork1
The transfer limits for the current week
18 19 20 |
# File 'lib/fdx_v660_api/models/time_and_occurrence_based_transfer_limits.rb', line 18 def week @week end |
#year ⇒ TimeframeBasedLimitsForAPaymentNetwork3
The transfer limits for the current year
26 27 28 |
# File 'lib/fdx_v660_api/models/time_and_occurrence_based_transfer_limits.rb', line 26 def year @year end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/fdx_v660_api/models/time_and_occurrence_based_transfer_limits.rb', line 73 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. day = TimeframeBasedLimitsForAPaymentNetwork5.from_hash(hash['day']) if hash['day'] week = TimeframeBasedLimitsForAPaymentNetwork1.from_hash(hash['week']) if hash['week'] month = TimeframeBasedLimitsForAPaymentNetwork2.from_hash(hash['month']) if hash['month'] year = TimeframeBasedLimitsForAPaymentNetwork3.from_hash(hash['year']) if hash['year'] transaction = OccurrenceBasedLimitsForAPaymentNetwork2.from_hash(hash['transaction']) if hash['transaction'] # 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. TimeAndOccurrenceBasedTransferLimits.new(day: day, week: week, month: month, year: year, transaction: transaction, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/fdx_v660_api/models/time_and_occurrence_based_transfer_limits.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['day'] = 'day' @_hash['week'] = 'week' @_hash['month'] = 'month' @_hash['year'] = 'year' @_hash['transaction'] = 'transaction' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/fdx_v660_api/models/time_and_occurrence_based_transfer_limits.rb', line 55 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 51 52 |
# File 'lib/fdx_v660_api/models/time_and_occurrence_based_transfer_limits.rb', line 44 def self.optionals %w[ day week month year transaction ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
108 109 110 111 112 113 |
# File 'lib/fdx_v660_api/models/time_and_occurrence_based_transfer_limits.rb', line 108 def inspect class_name = self.class.name.split('::').last "<#{class_name} day: #{@day.inspect}, week: #{@week.inspect}, month: #{@month.inspect},"\ " year: #{@year.inspect}, transaction: #{@transaction.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
101 102 103 104 105 |
# File 'lib/fdx_v660_api/models/time_and_occurrence_based_transfer_limits.rb', line 101 def to_s class_name = self.class.name.split('::').last "<#{class_name} day: #{@day}, week: #{@week}, month: #{@month}, year: #{@year},"\ " transaction: #{@transaction}, additional_properties: #{@additional_properties}>" end |