Class: FdxV660Api::LineOfCreditAccountTermsAndConditionsEntity1

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb

Overview

Any data elements which have been updated since original Terms and Conditions

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(effective_date: SKIP, arbitration_provision: SKIP, card_replacement_fee: 0, paper_statements_fee: 0, domestic_atm_fee: 0, foreign_atm_foreign_currency_advance_fee: 0, foreign_atm_us_dollar_advance_fee: 0, foreign_purchase_foreign_currency_fee: 0, transaction_limits: SKIP, promotions: SKIP, fi_attributes: SKIP, annual_membership_fee: 0, travel_membership_fee: 0, purchase_apr: SKIP, convenience_checks_fee: 0, minimum_interest_charge: SKIP, penalty_apr: SKIP, penalty_apr_applies: SKIP, late_payment_fee: 0, overlimit_fee: 0, balance_transfers_and_cash_advances: SKIP, additional_properties: nil) ⇒ LineOfCreditAccountTermsAndConditionsEntity1

Returns a new instance of LineOfCreditAccountTermsAndConditionsEntity1.



173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 173

def initialize(effective_date: SKIP, arbitration_provision: SKIP,
               card_replacement_fee: 0, paper_statements_fee: 0,
               domestic_atm_fee: 0,
               foreign_atm_foreign_currency_advance_fee: 0,
               foreign_atm_us_dollar_advance_fee: 0,
               foreign_purchase_foreign_currency_fee: 0,
               transaction_limits: SKIP, promotions: SKIP,
               fi_attributes: SKIP, annual_membership_fee: 0,
               travel_membership_fee: 0, purchase_apr: SKIP,
               convenience_checks_fee: 0, minimum_interest_charge: SKIP,
               penalty_apr: SKIP, penalty_apr_applies: SKIP,
               late_payment_fee: 0, overlimit_fee: 0,
               balance_transfers_and_cash_advances: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @effective_date = effective_date unless effective_date == SKIP
  @arbitration_provision = arbitration_provision unless arbitration_provision == SKIP
  @card_replacement_fee = card_replacement_fee unless card_replacement_fee == SKIP
  @paper_statements_fee = paper_statements_fee unless paper_statements_fee == SKIP
  @domestic_atm_fee = domestic_atm_fee unless domestic_atm_fee == SKIP
  unless foreign_atm_foreign_currency_advance_fee == SKIP
    @foreign_atm_foreign_currency_advance_fee =
      foreign_atm_foreign_currency_advance_fee
  end
  unless foreign_atm_us_dollar_advance_fee == SKIP
    @foreign_atm_us_dollar_advance_fee =
      foreign_atm_us_dollar_advance_fee
  end
  unless foreign_purchase_foreign_currency_fee == SKIP
    @foreign_purchase_foreign_currency_fee =
      foreign_purchase_foreign_currency_fee
  end
  @transaction_limits = transaction_limits unless transaction_limits == SKIP
  @promotions = promotions unless promotions == SKIP
  @fi_attributes = fi_attributes unless fi_attributes == SKIP
  @annual_membership_fee = annual_membership_fee unless annual_membership_fee == SKIP
  @travel_membership_fee = travel_membership_fee unless travel_membership_fee == SKIP
  @purchase_apr = purchase_apr unless purchase_apr == SKIP
  @convenience_checks_fee = convenience_checks_fee unless convenience_checks_fee == SKIP
  @minimum_interest_charge = minimum_interest_charge unless minimum_interest_charge == SKIP
  @penalty_apr = penalty_apr unless penalty_apr == SKIP
  @penalty_apr_applies = penalty_apr_applies unless penalty_apr_applies == SKIP
  @late_payment_fee = late_payment_fee unless late_payment_fee == SKIP
  @overlimit_fee = overlimit_fee unless overlimit_fee == SKIP
  unless balance_transfers_and_cash_advances == SKIP
    @balance_transfers_and_cash_advances =
      balance_transfers_and_cash_advances
  end
  @additional_properties = additional_properties
end

Instance Attribute Details

#annual_membership_feeFloat

Fee for annual membership. The value is zero if not charged on this account

Returns:

  • (Float)


68
69
70
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 68

def annual_membership_fee
  @annual_membership_fee
end

#arbitration_provisionTrueClass | FalseClass

A terms and conditions clause that requires the parties to resolve their disputes through an arbitration process. If true, the terms and conditions have an Arbitration Provision

Returns:

  • (TrueClass | FalseClass)


21
22
23
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 21

def arbitration_provision
  @arbitration_provision
end

#balance_transfers_and_cash_advancesArray[BalanceTransferOrCashAdvance]

Array of all the different categories of balance transfers and cash advances and their associated annual percentage rates (APRs) and fees

Returns:



108
109
110
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 108

def balance_transfers_and_cash_advances
  @balance_transfers_and_cash_advances
end

#card_replacement_feeFloat

Fee for replacement of debit or credit card (Rush order?). The value is zero if not charged on this account

Returns:

  • (Float)


26
27
28
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 26

def card_replacement_fee
  @card_replacement_fee
end

#convenience_checks_feeFloat

Fee for convenience checks (per set). The value is zero if not charged on this account

Returns:

  • (Float)


82
83
84
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 82

def convenience_checks_fee
  @convenience_checks_fee
end

#domestic_atm_feeFloat

Fee for ATM withdrawal or advance in account-holder's own country and currency. The value is zero if not charged on this account

Returns:

  • (Float)


35
36
37
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 35

def domestic_atm_fee
  @domestic_atm_fee
end

#effective_dateDate

Date that the document or content became effective

Returns:

  • (Date)


15
16
17
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 15

def effective_date
  @effective_date
end

#fi_attributesArray[FiAttributeEntity]

Array of Financial institution-specific attributes

Returns:



63
64
65
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 63

def fi_attributes
  @fi_attributes
end

#foreign_atm_foreign_currency_advance_feeFloat

Fee for foreign transaction ATM withdrawal or advance in foreign currency. The value is zero if not charged on this account

Returns:

  • (Float)


40
41
42
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 40

def foreign_atm_foreign_currency_advance_fee
  @foreign_atm_foreign_currency_advance_fee
end

#foreign_atm_us_dollar_advance_feeFloat

Fee for foreign transaction ATM withdrawal or advance in US Dollars. The value is zero if not charged on this account

Returns:

  • (Float)


45
46
47
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 45

def foreign_atm_us_dollar_advance_fee
  @foreign_atm_us_dollar_advance_fee
end

#foreign_purchase_foreign_currency_feeFloat

Fee for foreign transaction purchase in foreign currency. The value is zero if not charged on this account

Returns:

  • (Float)


50
51
52
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 50

def foreign_purchase_foreign_currency_fee
  @foreign_purchase_foreign_currency_fee
end

#late_payment_feeFloat

Fee for a late payment. The value is zero if not charged on this account

Returns:

  • (Float)


98
99
100
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 98

def late_payment_fee
  @late_payment_fee
end

#minimum_interest_chargeFloat

Minimum Interest Charge

Returns:

  • (Float)


86
87
88
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 86

def minimum_interest_charge
  @minimum_interest_charge
end

#overlimit_feeFloat

Fee for an overlimit balance. The value is zero if not charged on this account

Returns:

  • (Float)


103
104
105
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 103

def overlimit_fee
  @overlimit_fee
end

#paper_statements_feeFloat

Fee for paper statements. The value is zero if not charged on this account

Returns:

  • (Float)


30
31
32
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 30

def paper_statements_fee
  @paper_statements_fee
end

#penalty_aprFloat

Penalty annual percentage rate (APR)

Returns:

  • (Float)


90
91
92
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 90

def penalty_apr
  @penalty_apr
end

#penalty_apr_appliesTrueClass | FalseClass

Whether or not consumer is paying the penalty annual percentage rate (APR)

Returns:

  • (TrueClass | FalseClass)


94
95
96
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 94

def penalty_apr_applies
  @penalty_apr_applies
end

#promotionsArray[PromotionEntity]

The promotions originally defined in Terms and Conditions or currently active on the account

Returns:



59
60
61
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 59

def promotions
  @promotions
end

#purchase_aprFloat

Annual percentage rate (APR) for Purchases

Returns:

  • (Float)


77
78
79
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 77

def purchase_apr
  @purchase_apr
end

#transaction_limitsArray[TransactionLimit]

The various maximum amounts on different types of account transactions

Returns:



54
55
56
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 54

def transaction_limits
  @transaction_limits
end

#travel_membership_feeFloat

Fee for travel membership. The value is zero if not charged on this account

Returns:

  • (Float)


73
74
75
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 73

def travel_membership_fee
  @travel_membership_fee
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 227

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  effective_date = hash.key?('effectiveDate') ? hash['effectiveDate'] : SKIP
  arbitration_provision =
    hash.key?('arbitrationProvision') ? hash['arbitrationProvision'] : SKIP
  card_replacement_fee = hash['cardReplacementFee'] ||= 0
  paper_statements_fee = hash['paperStatementsFee'] ||= 0
  domestic_atm_fee = hash['domesticAtmFee'] ||= 0
  foreign_atm_foreign_currency_advance_fee =
    hash['foreignAtmForeignCurrencyAdvanceFee'] ||= 0
  foreign_atm_us_dollar_advance_fee =
    hash['foreignAtmUsDollarAdvanceFee'] ||= 0
  foreign_purchase_foreign_currency_fee =
    hash['foreignPurchaseForeignCurrencyFee'] ||= 0
  # Parameter is an array, so we need to iterate through it
  transaction_limits = nil
  unless hash['transactionLimits'].nil?
    transaction_limits = []
    hash['transactionLimits'].each do |structure|
      transaction_limits << (TransactionLimit.from_hash(structure) if structure)
    end
  end

  transaction_limits = SKIP unless hash.key?('transactionLimits')
  # Parameter is an array, so we need to iterate through it
  promotions = nil
  unless hash['promotions'].nil?
    promotions = []
    hash['promotions'].each do |structure|
      promotions << (PromotionEntity.from_hash(structure) if structure)
    end
  end

  promotions = SKIP unless hash.key?('promotions')
  # Parameter is an array, so we need to iterate through it
  fi_attributes = nil
  unless hash['fiAttributes'].nil?
    fi_attributes = []
    hash['fiAttributes'].each do |structure|
      fi_attributes << (FiAttributeEntity.from_hash(structure) if structure)
    end
  end

  fi_attributes = SKIP unless hash.key?('fiAttributes')
  annual_membership_fee = hash['annualMembershipFee'] ||= 0
  travel_membership_fee = hash['travelMembershipFee'] ||= 0
  purchase_apr = hash.key?('purchaseApr') ? hash['purchaseApr'] : SKIP
  convenience_checks_fee = hash['convenienceChecksFee'] ||= 0
  minimum_interest_charge =
    hash.key?('minimumInterestCharge') ? hash['minimumInterestCharge'] : SKIP
  penalty_apr = hash.key?('penaltyApr') ? hash['penaltyApr'] : SKIP
  penalty_apr_applies =
    hash.key?('penaltyAprApplies') ? hash['penaltyAprApplies'] : SKIP
  late_payment_fee = hash['latePaymentFee'] ||= 0
  overlimit_fee = hash['overlimitFee'] ||= 0
  # Parameter is an array, so we need to iterate through it
  balance_transfers_and_cash_advances = nil
  unless hash['balanceTransfersAndCashAdvances'].nil?
    balance_transfers_and_cash_advances = []
    hash['balanceTransfersAndCashAdvances'].each do |structure|
      balance_transfers_and_cash_advances << (BalanceTransferOrCashAdvance.from_hash(structure) if structure)
    end
  end

  balance_transfers_and_cash_advances = SKIP unless hash.key?('balanceTransfersAndCashAdvances')

  # 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.
  LineOfCreditAccountTermsAndConditionsEntity1.new(effective_date: effective_date,
                                                   arbitration_provision: arbitration_provision,
                                                   card_replacement_fee: card_replacement_fee,
                                                   paper_statements_fee: paper_statements_fee,
                                                   domestic_atm_fee: domestic_atm_fee,
                                                   foreign_atm_foreign_currency_advance_fee: foreign_atm_foreign_currency_advance_fee,
                                                   foreign_atm_us_dollar_advance_fee: foreign_atm_us_dollar_advance_fee,
                                                   foreign_purchase_foreign_currency_fee: foreign_purchase_foreign_currency_fee,
                                                   transaction_limits: transaction_limits,
                                                   promotions: promotions,
                                                   fi_attributes: fi_attributes,
                                                   annual_membership_fee: annual_membership_fee,
                                                   travel_membership_fee: travel_membership_fee,
                                                   purchase_apr: purchase_apr,
                                                   convenience_checks_fee: convenience_checks_fee,
                                                   minimum_interest_charge: minimum_interest_charge,
                                                   penalty_apr: penalty_apr,
                                                   penalty_apr_applies: penalty_apr_applies,
                                                   late_payment_fee: late_payment_fee,
                                                   overlimit_fee: overlimit_fee,
                                                   balance_transfers_and_cash_advances: balance_transfers_and_cash_advances,
                                                   additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 111

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['effective_date'] = 'effectiveDate'
  @_hash['arbitration_provision'] = 'arbitrationProvision'
  @_hash['card_replacement_fee'] = 'cardReplacementFee'
  @_hash['paper_statements_fee'] = 'paperStatementsFee'
  @_hash['domestic_atm_fee'] = 'domesticAtmFee'
  @_hash['foreign_atm_foreign_currency_advance_fee'] =
    'foreignAtmForeignCurrencyAdvanceFee'
  @_hash['foreign_atm_us_dollar_advance_fee'] =
    'foreignAtmUsDollarAdvanceFee'
  @_hash['foreign_purchase_foreign_currency_fee'] =
    'foreignPurchaseForeignCurrencyFee'
  @_hash['transaction_limits'] = 'transactionLimits'
  @_hash['promotions'] = 'promotions'
  @_hash['fi_attributes'] = 'fiAttributes'
  @_hash['annual_membership_fee'] = 'annualMembershipFee'
  @_hash['travel_membership_fee'] = 'travelMembershipFee'
  @_hash['purchase_apr'] = 'purchaseApr'
  @_hash['convenience_checks_fee'] = 'convenienceChecksFee'
  @_hash['minimum_interest_charge'] = 'minimumInterestCharge'
  @_hash['penalty_apr'] = 'penaltyApr'
  @_hash['penalty_apr_applies'] = 'penaltyAprApplies'
  @_hash['late_payment_fee'] = 'latePaymentFee'
  @_hash['overlimit_fee'] = 'overlimitFee'
  @_hash['balance_transfers_and_cash_advances'] =
    'balanceTransfersAndCashAdvances'
  @_hash
end

.nullablesObject

An array for nullable fields



169
170
171
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 169

def self.nullables
  []
end

.optionalsObject

An array for optional fields



142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 142

def self.optionals
  %w[
    effective_date
    arbitration_provision
    card_replacement_fee
    paper_statements_fee
    domestic_atm_fee
    foreign_atm_foreign_currency_advance_fee
    foreign_atm_us_dollar_advance_fee
    foreign_purchase_foreign_currency_fee
    transaction_limits
    promotions
    fi_attributes
    annual_membership_fee
    travel_membership_fee
    purchase_apr
    convenience_checks_fee
    minimum_interest_charge
    penalty_apr
    penalty_apr_applies
    late_payment_fee
    overlimit_fee
    balance_transfers_and_cash_advances
  ]
end

.validate(value) ⇒ Object

Validates an instance of the object from a given value.

Parameters:



329
330
331
332
333
334
335
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 329

def self.validate(value)
  return true if value.instance_of? self

  return false unless value.instance_of? Hash

  true
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 358

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} effective_date: #{@effective_date.inspect}, arbitration_provision:"\
  " #{@arbitration_provision.inspect}, card_replacement_fee: #{@card_replacement_fee.inspect},"\
  " paper_statements_fee: #{@paper_statements_fee.inspect}, domestic_atm_fee:"\
  " #{@domestic_atm_fee.inspect}, foreign_atm_foreign_currency_advance_fee:"\
  " #{@foreign_atm_foreign_currency_advance_fee.inspect}, foreign_atm_us_dollar_advance_fee:"\
  " #{@foreign_atm_us_dollar_advance_fee.inspect}, foreign_purchase_foreign_currency_fee:"\
  " #{@foreign_purchase_foreign_currency_fee.inspect}, transaction_limits:"\
  " #{@transaction_limits.inspect}, promotions: #{@promotions.inspect}, fi_attributes:"\
  " #{@fi_attributes.inspect}, annual_membership_fee: #{@annual_membership_fee.inspect},"\
  " travel_membership_fee: #{@travel_membership_fee.inspect}, purchase_apr:"\
  " #{@purchase_apr.inspect}, convenience_checks_fee: #{@convenience_checks_fee.inspect},"\
  " minimum_interest_charge: #{@minimum_interest_charge.inspect}, penalty_apr:"\
  " #{@penalty_apr.inspect}, penalty_apr_applies: #{@penalty_apr_applies.inspect},"\
  " late_payment_fee: #{@late_payment_fee.inspect}, overlimit_fee: #{@overlimit_fee.inspect},"\
  " balance_transfers_and_cash_advances: #{@balance_transfers_and_cash_advances.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
# File 'lib/fdx_v660_api/models/line_of_credit_account_terms_and_conditions_entity1.rb', line 338

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} effective_date: #{@effective_date}, arbitration_provision:"\
  " #{@arbitration_provision}, card_replacement_fee: #{@card_replacement_fee},"\
  " paper_statements_fee: #{@paper_statements_fee}, domestic_atm_fee: #{@domestic_atm_fee},"\
  " foreign_atm_foreign_currency_advance_fee: #{@foreign_atm_foreign_currency_advance_fee},"\
  " foreign_atm_us_dollar_advance_fee: #{@foreign_atm_us_dollar_advance_fee},"\
  " foreign_purchase_foreign_currency_fee: #{@foreign_purchase_foreign_currency_fee},"\
  " transaction_limits: #{@transaction_limits}, promotions: #{@promotions}, fi_attributes:"\
  " #{@fi_attributes}, annual_membership_fee: #{@annual_membership_fee},"\
  " travel_membership_fee: #{@travel_membership_fee}, purchase_apr: #{@purchase_apr},"\
  " convenience_checks_fee: #{@convenience_checks_fee}, minimum_interest_charge:"\
  " #{@minimum_interest_charge}, penalty_apr: #{@penalty_apr}, penalty_apr_applies:"\
  " #{@penalty_apr_applies}, late_payment_fee: #{@late_payment_fee}, overlimit_fee:"\
  " #{@overlimit_fee}, balance_transfers_and_cash_advances:"\
  " #{@balance_transfers_and_cash_advances}, additional_properties:"\
  " #{@additional_properties}>"
end