Class: ShellDataReportingApIs::MultiPricedTransactionRequestAccountsItems

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

Overview

MultiPricedTransactionRequestAccountsItems Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP) ⇒ MultiPricedTransactionRequestAccountsItems

Returns a new instance of MultiPricedTransactionRequestAccountsItems.



57
58
59
60
61
62
63
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb', line 57

def initialize(payer_id = SKIP, payer_number = SKIP,  = SKIP,
                = SKIP)
  @payer_id = payer_id unless payer_id == SKIP
  @payer_number = payer_number unless payer_number == SKIP
  @account_id =  unless  == SKIP
  @account_number =  unless  == SKIP
end

Instance Attribute Details

#account_idInteger

Account Id of the selected account.

Returns:

  • (Integer)


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

def 
  @account_id
end

#account_numberString

Account Number (ex: GB000000123) of the selected account.

Returns:

  • (String)


30
31
32
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb', line 30

def 
  @account_number
end

#payer_idInteger

Payer Id of the selected payer. Optional if PayerNumber is passed else Mandatory Example: 123456

Returns:

  • (Integer)


16
17
18
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb', line 16

def payer_id
  @payer_id
end

#payer_numberString

Payer Number (Ex: GB000000123) of the selected payer. Optional if PayerId is passed else Mandatory Example: GB000000123

Returns:

  • (String)


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

def payer_number
  @payer_number
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb', line 66

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
  payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
   = hash.key?('AccountId') ? hash['AccountId'] : SKIP
   = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP

  # Create object from extracted values.
  MultiPricedTransactionRequestAccountsItems.new(payer_id,
                                                 payer_number,
                                                 ,
                                                 )
end

.namesObject

A mapping from model property names to API property names.



33
34
35
36
37
38
39
40
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb', line 33

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['payer_id'] = 'PayerId'
  @_hash['payer_number'] = 'PayerNumber'
  @_hash['account_id'] = 'AccountId'
  @_hash['account_number'] = 'AccountNumber'
  @_hash
end

.nullablesObject

An array for nullable fields



53
54
55
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb', line 53

def self.nullables
  []
end

.optionalsObject

An array for optional fields



43
44
45
46
47
48
49
50
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb', line 43

def self.optionals
  %w[
    payer_id
    payer_number
    account_id
    account_number
  ]
end