Class: ShellDataReportingApIs::BonusConfiguration

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/shell_data_reporting_ap_is/models/bonus_configuration.rb

Overview

BonusConfiguration Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(pricing_account_id = SKIP, pricing_account_number = SKIP, pricing_account_short_name = SKIP, pricing_account_full_name = SKIP, fee_rule_id = SKIP, fee_rule_description = SKIP, fee_rule_date_effective = SKIP, fee_rule_date_terminated = SKIP, bonus_paid_to = SKIP, bonus_paid_to_account_id = SKIP, bonus_paid_to_account_number = SKIP, bonus_paid_to_account_short_name = SKIP, bonus_paid_to_account_full_name = SKIP, frequency = SKIP, next_calculation_date = SKIP, previous_calculated_date = SKIP, fee_rule_basis = SKIP, fee_rule_currency_code = SKIP, fee_rule_currency_symbol = SKIP, fee_rule_available_from = SKIP, fee_rule_available_to = SKIP, fee_rule_locations = SKIP, fee_rule_tiers = SKIP, associated_accounts = SKIP, fee_rule_products = SKIP) ⇒ BonusConfiguration

Returns a new instance of BonusConfiguration.



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
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 240

def initialize( = SKIP,  = SKIP,
                = SKIP,
                = SKIP, fee_rule_id = SKIP,
               fee_rule_description = SKIP, fee_rule_date_effective = SKIP,
               fee_rule_date_terminated = SKIP, bonus_paid_to = SKIP,
                = SKIP,
                = SKIP,
                = SKIP,
                = SKIP, frequency = SKIP,
               next_calculation_date = SKIP,
               previous_calculated_date = SKIP, fee_rule_basis = SKIP,
               fee_rule_currency_code = SKIP,
               fee_rule_currency_symbol = SKIP,
               fee_rule_available_from = SKIP, fee_rule_available_to = SKIP,
               fee_rule_locations = SKIP, fee_rule_tiers = SKIP,
               associated_accounts = SKIP, fee_rule_products = SKIP)
  @pricing_account_id =  unless  == SKIP
  @pricing_account_number =  unless  == SKIP
  unless  == SKIP
    @pricing_account_short_name =
      
  end
  unless  == SKIP
    @pricing_account_full_name =
      
  end
  @fee_rule_id = fee_rule_id unless fee_rule_id == SKIP
  @fee_rule_description = fee_rule_description unless fee_rule_description == SKIP
  @fee_rule_date_effective = fee_rule_date_effective unless fee_rule_date_effective == SKIP
  @fee_rule_date_terminated = fee_rule_date_terminated unless fee_rule_date_terminated == SKIP
  @bonus_paid_to = bonus_paid_to unless bonus_paid_to == SKIP
  @bonus_paid_to_account_id =  unless  == SKIP
  unless  == SKIP
    @bonus_paid_to_account_number =
      
  end
  unless  == SKIP
    @bonus_paid_to_account_short_name =
      
  end
  unless  == SKIP
    @bonus_paid_to_account_full_name =
      
  end
  @frequency = frequency unless frequency == SKIP
  @next_calculation_date = next_calculation_date unless next_calculation_date == SKIP
  @previous_calculated_date = previous_calculated_date unless previous_calculated_date == SKIP
  @fee_rule_basis = fee_rule_basis unless fee_rule_basis == SKIP
  @fee_rule_currency_code = fee_rule_currency_code unless fee_rule_currency_code == SKIP
  @fee_rule_currency_symbol = fee_rule_currency_symbol unless fee_rule_currency_symbol == SKIP
  @fee_rule_available_from = fee_rule_available_from unless fee_rule_available_from == SKIP
  @fee_rule_available_to = fee_rule_available_to unless fee_rule_available_to == SKIP
  @fee_rule_locations = fee_rule_locations unless fee_rule_locations == SKIP
  @fee_rule_tiers = fee_rule_tiers unless fee_rule_tiers == SKIP
  @associated_accounts = associated_accounts unless associated_accounts == SKIP
  @fee_rule_products = fee_rule_products unless fee_rule_products == SKIP
end

Instance Attribute Details

#associated_accountsArray[AssociatedAccount]

This bonus or association bonus configuration will not be available from this date. Format: YYYYMMDD

Returns:



142
143
144
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 142

def associated_accounts
  @associated_accounts
end

#bonus_paid_toString

Configuration to specify how the bonus is paid. Format: ID-Description Example: 1-Pay to Payer 2-Pay to invoice levels before the payer 3-Pay to specific customer 4-Pay to Association Customer 5-Pay to Associated Customers

Returns:

  • (String)


59
60
61
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 59

def bonus_paid_to
  @bonus_paid_to
end

#bonus_paid_to_account_full_nameString

Full name of the specific account to which the bonus is paid back

Returns:

  • (String)


75
76
77
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 75

def 
  @bonus_paid_to_account_full_name
end

#bonus_paid_to_account_idInteger

Account identifier of the specific account to which the bonus is paid back

Returns:

  • (Integer)


63
64
65
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 63

def 
  @bonus_paid_to_account_id
end

#bonus_paid_to_account_numberString

Account number of the specific account to which the bonus is paid back

Returns:

  • (String)


67
68
69
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 67

def 
  @bonus_paid_to_account_number
end

#bonus_paid_to_account_short_nameString

Short name of the specific account to which the bonus is paid back

Returns:

  • (String)


71
72
73
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 71

def 
  @bonus_paid_to_account_short_name
end

#fee_rule_available_fromString

This bonus or association bonus is available from this date. Format: YYYYMMDD

Returns:

  • (String)


118
119
120
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 118

def fee_rule_available_from
  @fee_rule_available_from
end

#fee_rule_available_toString

This bonus or association bonus configuration will not be available from this date. Format: YYYYMMDD

Returns:

  • (String)


124
125
126
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 124

def fee_rule_available_to
  @fee_rule_available_to
end

#fee_rule_basisString

Fee Rule Basis configured. Format: ID-Description Example: 1-Currency Per Unit 2-Percentage of Uplift 3-Lump Sum

Returns:

  • (String)


103
104
105
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 103

def fee_rule_basis
  @fee_rule_basis
end

#fee_rule_currency_codeString

ISO currency code of the currency configured in the Bonus Configuration, if any.

Returns:

  • (String)


108
109
110
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 108

def fee_rule_currency_code
  @fee_rule_currency_code
end

#fee_rule_currency_symbolString

Currency symbol of the currency configured in the Bonus Configuration, if any.

Returns:

  • (String)


113
114
115
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 113

def fee_rule_currency_symbol
  @fee_rule_currency_symbol
end

#fee_rule_date_effectiveString

The bonus or association bonus configuration becomes effective on the payer from this date. Format: YYYYMMDD

Returns:

  • (String)


42
43
44
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 42

def fee_rule_date_effective
  @fee_rule_date_effective
end

#fee_rule_date_terminatedString

The bonus or association bonus configuration is terminated for the payer on this date. Format: YYYYMMDD

Returns:

  • (String)


48
49
50
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 48

def fee_rule_date_terminated
  @fee_rule_date_terminated
end

#fee_rule_descriptionString

Bonus or association bonus configuration description that is associated to the payer.

Returns:

  • (String)


36
37
38
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 36

def fee_rule_description
  @fee_rule_description
end

#fee_rule_idInteger

Bonus or association bonus configuration identifier that is associated to the payer.

Returns:

  • (Integer)


31
32
33
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 31

def fee_rule_id
  @fee_rule_id
end

#fee_rule_locationsArray[FeeRuleLocation]

This bonus or association bonus configuration will not be available from this date. Format: YYYYMMDD

Returns:



130
131
132
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 130

def fee_rule_locations
  @fee_rule_locations
end

#fee_rule_productsArray[FeeRuleProduct]

This bonus or association bonus configuration will not be available from this date. Format: YYYYMMDD

Returns:



148
149
150
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 148

def fee_rule_products
  @fee_rule_products
end

#fee_rule_tiersArray[FeeRuleTier]

This bonus or association bonus configuration will not be available from this date. Format: YYYYMMDD

Returns:



136
137
138
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 136

def fee_rule_tiers
  @fee_rule_tiers
end

#frequencyString

Frequency of the configuration. Format: ID-Description Examples: 1-Daily (all days) 2-Daily (only working days) 3-Weekly – Monday

Returns:

  • (String)


84
85
86
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 84

def frequency
  @frequency
end

#next_calculation_dateString

The next bonus is calculated for the payer on this date. Format: YYYYMMDD

Returns:

  • (String)


89
90
91
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 89

def next_calculation_date
  @next_calculation_date
end

#previous_calculated_dateString

The previous bonus was calculated for the payer on this date. Format: YYYYMMDD

Returns:

  • (String)


94
95
96
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 94

def previous_calculated_date
  @previous_calculated_date
end

#pricing_account_full_nameString

Full name of the Pricing Account associated with the Payer.

Returns:

  • (String)


26
27
28
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 26

def 
  @pricing_account_full_name
end

#pricing_account_idInteger

Account identifier of the Pricing Account associated with the Payer.

Returns:

  • (Integer)


14
15
16
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 14

def 
  @pricing_account_id
end

#pricing_account_numberString

Account number of the Pricing Account associated with the Payer.

Returns:

  • (String)


18
19
20
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 18

def 
  @pricing_account_number
end

#pricing_account_short_nameString

Short name of the Pricing Account associated with the Payer.

Returns:

  • (String)


22
23
24
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 22

def 
  @pricing_account_short_name
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 299

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   =
    hash.key?('PricingAccountId') ? hash['PricingAccountId'] : SKIP
   =
    hash.key?('PricingAccountNumber') ? hash['PricingAccountNumber'] : SKIP
   =
    hash.key?('PricingAccountShortName') ? hash['PricingAccountShortName'] : SKIP
   =
    hash.key?('PricingAccountFullName') ? hash['PricingAccountFullName'] : SKIP
  fee_rule_id = hash.key?('FeeRuleId') ? hash['FeeRuleId'] : SKIP
  fee_rule_description =
    hash.key?('FeeRuleDescription') ? hash['FeeRuleDescription'] : SKIP
  fee_rule_date_effective =
    hash.key?('FeeRuleDateEffective') ? hash['FeeRuleDateEffective'] : SKIP
  fee_rule_date_terminated =
    hash.key?('FeeRuleDateTerminated') ? hash['FeeRuleDateTerminated'] : SKIP
  bonus_paid_to = hash.key?('BonusPaidTo') ? hash['BonusPaidTo'] : SKIP
   =
    hash.key?('BonusPaidToAccountId') ? hash['BonusPaidToAccountId'] : SKIP
   =
    hash.key?('BonusPaidToAccountNumber') ? hash['BonusPaidToAccountNumber'] : SKIP
   =
    hash.key?('BonusPaidToAccountShortName') ? hash['BonusPaidToAccountShortName'] : SKIP
   =
    hash.key?('BonusPaidToAccountFullName') ? hash['BonusPaidToAccountFullName'] : SKIP
  frequency = hash.key?('Frequency') ? hash['Frequency'] : SKIP
  next_calculation_date =
    hash.key?('NextCalculationDate') ? hash['NextCalculationDate'] : SKIP
  previous_calculated_date =
    hash.key?('PreviousCalculatedDate') ? hash['PreviousCalculatedDate'] : SKIP
  fee_rule_basis = hash.key?('FeeRuleBasis') ? hash['FeeRuleBasis'] : SKIP
  fee_rule_currency_code =
    hash.key?('FeeRuleCurrencyCode') ? hash['FeeRuleCurrencyCode'] : SKIP
  fee_rule_currency_symbol =
    hash.key?('FeeRuleCurrencySymbol') ? hash['FeeRuleCurrencySymbol'] : SKIP
  fee_rule_available_from =
    hash.key?('FeeRuleAvailableFrom') ? hash['FeeRuleAvailableFrom'] : SKIP
  fee_rule_available_to =
    hash.key?('FeeRuleAvailableTo') ? hash['FeeRuleAvailableTo'] : SKIP
  # Parameter is an array, so we need to iterate through it
  fee_rule_locations = nil
  unless hash['FeeRuleLocations'].nil?
    fee_rule_locations = []
    hash['FeeRuleLocations'].each do |structure|
      fee_rule_locations << (FeeRuleLocation.from_hash(structure) if structure)
    end
  end

  fee_rule_locations = SKIP unless hash.key?('FeeRuleLocations')
  # Parameter is an array, so we need to iterate through it
  fee_rule_tiers = nil
  unless hash['FeeRuleTiers'].nil?
    fee_rule_tiers = []
    hash['FeeRuleTiers'].each do |structure|
      fee_rule_tiers << (FeeRuleTier.from_hash(structure) if structure)
    end
  end

  fee_rule_tiers = SKIP unless hash.key?('FeeRuleTiers')
  # Parameter is an array, so we need to iterate through it
  associated_accounts = nil
  unless hash['AssociatedAccounts'].nil?
    associated_accounts = []
    hash['AssociatedAccounts'].each do |structure|
      associated_accounts << (AssociatedAccount.from_hash(structure) if structure)
    end
  end

  associated_accounts = SKIP unless hash.key?('AssociatedAccounts')
  # Parameter is an array, so we need to iterate through it
  fee_rule_products = nil
  unless hash['FeeRuleProducts'].nil?
    fee_rule_products = []
    hash['FeeRuleProducts'].each do |structure|
      fee_rule_products << (FeeRuleProduct.from_hash(structure) if structure)
    end
  end

  fee_rule_products = SKIP unless hash.key?('FeeRuleProducts')

  # Create object from extracted values.
  BonusConfiguration.new(,
                         ,
                         ,
                         ,
                         fee_rule_id,
                         fee_rule_description,
                         fee_rule_date_effective,
                         fee_rule_date_terminated,
                         bonus_paid_to,
                         ,
                         ,
                         ,
                         ,
                         frequency,
                         next_calculation_date,
                         previous_calculated_date,
                         fee_rule_basis,
                         fee_rule_currency_code,
                         fee_rule_currency_symbol,
                         fee_rule_available_from,
                         fee_rule_available_to,
                         fee_rule_locations,
                         fee_rule_tiers,
                         associated_accounts,
                         fee_rule_products)
end

.namesObject

A mapping from model property names to API property names.



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 151

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['pricing_account_id'] = 'PricingAccountId'
  @_hash['pricing_account_number'] = 'PricingAccountNumber'
  @_hash['pricing_account_short_name'] = 'PricingAccountShortName'
  @_hash['pricing_account_full_name'] = 'PricingAccountFullName'
  @_hash['fee_rule_id'] = 'FeeRuleId'
  @_hash['fee_rule_description'] = 'FeeRuleDescription'
  @_hash['fee_rule_date_effective'] = 'FeeRuleDateEffective'
  @_hash['fee_rule_date_terminated'] = 'FeeRuleDateTerminated'
  @_hash['bonus_paid_to'] = 'BonusPaidTo'
  @_hash['bonus_paid_to_account_id'] = 'BonusPaidToAccountId'
  @_hash['bonus_paid_to_account_number'] = 'BonusPaidToAccountNumber'
  @_hash['bonus_paid_to_account_short_name'] =
    'BonusPaidToAccountShortName'
  @_hash['bonus_paid_to_account_full_name'] = 'BonusPaidToAccountFullName'
  @_hash['frequency'] = 'Frequency'
  @_hash['next_calculation_date'] = 'NextCalculationDate'
  @_hash['previous_calculated_date'] = 'PreviousCalculatedDate'
  @_hash['fee_rule_basis'] = 'FeeRuleBasis'
  @_hash['fee_rule_currency_code'] = 'FeeRuleCurrencyCode'
  @_hash['fee_rule_currency_symbol'] = 'FeeRuleCurrencySymbol'
  @_hash['fee_rule_available_from'] = 'FeeRuleAvailableFrom'
  @_hash['fee_rule_available_to'] = 'FeeRuleAvailableTo'
  @_hash['fee_rule_locations'] = 'FeeRuleLocations'
  @_hash['fee_rule_tiers'] = 'FeeRuleTiers'
  @_hash['associated_accounts'] = 'AssociatedAccounts'
  @_hash['fee_rule_products'] = 'FeeRuleProducts'
  @_hash
end

.nullablesObject

An array for nullable fields



214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 214

def self.nullables
  %w[
    pricing_account_id
    pricing_account_number
    pricing_account_short_name
    pricing_account_full_name
    fee_rule_id
    fee_rule_description
    fee_rule_date_effective
    fee_rule_date_terminated
    bonus_paid_to
    bonus_paid_to_account_id
    bonus_paid_to_account_number
    bonus_paid_to_account_short_name
    bonus_paid_to_account_full_name
    frequency
    next_calculation_date
    previous_calculated_date
    fee_rule_basis
    fee_rule_currency_code
    fee_rule_currency_symbol
    fee_rule_available_from
    fee_rule_available_to
  ]
end

.optionalsObject

An array for optional fields



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
# File 'lib/shell_data_reporting_ap_is/models/bonus_configuration.rb', line 183

def self.optionals
  %w[
    pricing_account_id
    pricing_account_number
    pricing_account_short_name
    pricing_account_full_name
    fee_rule_id
    fee_rule_description
    fee_rule_date_effective
    fee_rule_date_terminated
    bonus_paid_to
    bonus_paid_to_account_id
    bonus_paid_to_account_number
    bonus_paid_to_account_short_name
    bonus_paid_to_account_full_name
    frequency
    next_calculation_date
    previous_calculated_date
    fee_rule_basis
    fee_rule_currency_code
    fee_rule_currency_symbol
    fee_rule_available_from
    fee_rule_available_to
    fee_rule_locations
    fee_rule_tiers
    associated_accounts
    fee_rule_products
  ]
end