Class: ShellDataReportingApIs::MultiPricedTransactionRequestAccountsItems
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::MultiPricedTransactionRequestAccountsItems
- Defined in:
- lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb
Overview
MultiPricedTransactionRequestAccountsItems Model.
Instance Attribute Summary collapse
-
#account_id ⇒ Integer
Account Id of the selected account.
-
#account_number ⇒ String
Account Number (ex: GB000000123) of the selected account.
-
#payer_id ⇒ Integer
Payer Id of the selected payer.
-
#payer_number ⇒ String
Payer Number (Ex: GB000000123) of the selected payer.
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(payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP) ⇒ MultiPricedTransactionRequestAccountsItems
constructor
A new instance of MultiPricedTransactionRequestAccountsItems.
Methods inherited from BaseModel
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, account_id = SKIP, account_number = SKIP) @payer_id = payer_id unless payer_id == SKIP @payer_number = payer_number unless payer_number == SKIP @account_id = account_id unless account_id == SKIP @account_number = account_number unless account_number == SKIP end |
Instance Attribute Details
#account_id ⇒ Integer
Account Id of the selected account.
26 27 28 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb', line 26 def account_id @account_id end |
#account_number ⇒ String
Account Number (ex: GB000000123) of the selected account.
30 31 32 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb', line 30 def account_number @account_number end |
#payer_id ⇒ Integer
Payer Id of the selected payer. Optional if PayerNumber is passed else Mandatory Example: 123456
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_number ⇒ String
Payer Number (Ex: GB000000123) of the selected payer. Optional if PayerId is passed else Mandatory Example: GB000000123
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 account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP # Create object from extracted values. MultiPricedTransactionRequestAccountsItems.new(payer_id, payer_number, account_id, account_number) end |
.names ⇒ Object
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 |
.nullables ⇒ Object
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 |
.optionals ⇒ Object
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 |