Class: ShellDataReportingApIs::SearchStatementOfAccount
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::SearchStatementOfAccount
- Defined in:
- lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb
Overview
SearchStatementOfAccount Model.
Instance Attribute Summary collapse
-
#amount_due ⇒ Float
Invoiced amount and due for payment.
-
#amount_overdue ⇒ Float
Invoiced amount and overdue for payment.
-
#currency_code ⇒ String
ISO code of SOA currency.
-
#currency_symbol ⇒ String
Symbol of SOA currency.
-
#document_reference_number ⇒ String
Document reference number fetched.
-
#due_date ⇒ String
Due date for payment.
-
#gross_amount_customer_currency ⇒ Float
Total gross amount in customer currency.
-
#invoiced_on_behalf_of ⇒ String
ISO code of the country i.e., UK, DE, MY, etc.
-
#payer_id ⇒ Integer
Payment customer id of the customer.
-
#payer_number ⇒ String
Payment customer number.
-
#so_a_reference_number ⇒ String
Statement of account reference.
-
#statement_date ⇒ String
Date on which the SOA was generated.
-
#statement_of_account_id ⇒ Integer
Statement of account identifier.
-
#status ⇒ String
Status of the document.
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(statement_of_account_id = SKIP, so_a_reference_number = SKIP, statement_date = SKIP, payer_id = SKIP, payer_number = SKIP, amount_due = SKIP, amount_overdue = SKIP, currency_code = SKIP, currency_symbol = SKIP, due_date = SKIP, invoiced_on_behalf_of = SKIP, status = SKIP, gross_amount_customer_currency = SKIP, document_reference_number = SKIP) ⇒ SearchStatementOfAccount
constructor
A new instance of SearchStatementOfAccount.
Methods inherited from BaseModel
Constructor Details
#initialize(statement_of_account_id = SKIP, so_a_reference_number = SKIP, statement_date = SKIP, payer_id = SKIP, payer_number = SKIP, amount_due = SKIP, amount_overdue = SKIP, currency_code = SKIP, currency_symbol = SKIP, due_date = SKIP, invoiced_on_behalf_of = SKIP, status = SKIP, gross_amount_customer_currency = SKIP, document_reference_number = SKIP) ⇒ SearchStatementOfAccount
Returns a new instance of SearchStatementOfAccount.
141 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 167 168 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 141 def initialize(statement_of_account_id = SKIP, so_a_reference_number = SKIP, statement_date = SKIP, payer_id = SKIP, payer_number = SKIP, amount_due = SKIP, amount_overdue = SKIP, currency_code = SKIP, currency_symbol = SKIP, due_date = SKIP, invoiced_on_behalf_of = SKIP, status = SKIP, gross_amount_customer_currency = SKIP, document_reference_number = SKIP) @statement_of_account_id = statement_of_account_id unless statement_of_account_id == SKIP @so_a_reference_number = so_a_reference_number unless so_a_reference_number == SKIP @statement_date = statement_date unless statement_date == SKIP @payer_id = payer_id unless payer_id == SKIP @payer_number = payer_number unless payer_number == SKIP @amount_due = amount_due unless amount_due == SKIP @amount_overdue = amount_overdue unless amount_overdue == SKIP @currency_code = currency_code unless currency_code == SKIP @currency_symbol = currency_symbol unless currency_symbol == SKIP @due_date = due_date unless due_date == SKIP @invoiced_on_behalf_of = invoiced_on_behalf_of unless invoiced_on_behalf_of == SKIP @status = status unless status == SKIP unless gross_amount_customer_currency == SKIP @gross_amount_customer_currency = gross_amount_customer_currency end unless document_reference_number == SKIP @document_reference_number = document_reference_number end end |
Instance Attribute Details
#amount_due ⇒ Float
Invoiced amount and due for payment
35 36 37 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 35 def amount_due @amount_due end |
#amount_overdue ⇒ Float
Invoiced amount and overdue for payment.
39 40 41 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 39 def amount_overdue @amount_overdue end |
#currency_code ⇒ String
ISO code of SOA currency.
43 44 45 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 43 def currency_code @currency_code end |
#currency_symbol ⇒ String
Symbol of SOA currency. Example: €
48 49 50 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 48 def currency_symbol @currency_symbol end |
#document_reference_number ⇒ String
Document reference number fetched
79 80 81 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 79 def document_reference_number @document_reference_number end |
#due_date ⇒ String
Due date for payment. Format: yyyyMMdd Note: • Clients to convert this to appropriate DateTime type. • SoA due date is considered as the latest due date of the invoices within the SoA
56 57 58 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 56 def due_date @due_date end |
#gross_amount_customer_currency ⇒ Float
Total gross amount in customer currency.
75 76 77 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 75 def gross_amount_customer_currency @gross_amount_customer_currency end |
#invoiced_on_behalf_of ⇒ String
ISO code of the country i.e., UK, DE, MY, etc. This is the value of the first invoice within the SoA. It may not be same for all the invoices within the SoA.
62 63 64 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 62 def invoiced_on_behalf_of @invoiced_on_behalf_of end |
#payer_id ⇒ Integer
Payment customer id of the customer.
27 28 29 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 27 def payer_id @payer_id end |
#payer_number ⇒ String
Payment customer number.
31 32 33 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 31 def payer_number @payer_number end |
#so_a_reference_number ⇒ String
Statement of account reference
18 19 20 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 18 def so_a_reference_number @so_a_reference_number end |
#statement_date ⇒ String
Date on which the SOA was generated. Format: yyyyMMdd
23 24 25 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 23 def statement_date @statement_date end |
#statement_of_account_id ⇒ Integer
Statement of account identifier
14 15 16 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 14 def statement_of_account_id @statement_of_account_id end |
#status ⇒ String
Status of the document. Valid values –
-
Paid – Fully paid all Invoices with in the SOA.
-
Overdue – At least one invoice payment due date is less than current
date with in the SOA.
-
Due – At least one invoice is due for payment and is within the due
date. There is no invoice overdue for payment.
71 72 73 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 71 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
171 172 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 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 171 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. statement_of_account_id = hash.key?('StatementOfAccountId') ? hash['StatementOfAccountId'] : SKIP so_a_reference_number = hash.key?('SoAReferenceNumber') ? hash['SoAReferenceNumber'] : SKIP statement_date = hash.key?('StatementDate') ? hash['StatementDate'] : SKIP payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP amount_due = hash.key?('AmountDue') ? hash['AmountDue'] : SKIP amount_overdue = hash.key?('AmountOverdue') ? hash['AmountOverdue'] : SKIP currency_code = hash.key?('CurrencyCode') ? hash['CurrencyCode'] : SKIP currency_symbol = hash.key?('CurrencySymbol') ? hash['CurrencySymbol'] : SKIP due_date = hash.key?('DueDate') ? hash['DueDate'] : SKIP invoiced_on_behalf_of = hash.key?('InvoicedOnBehalfOf') ? hash['InvoicedOnBehalfOf'] : SKIP status = hash.key?('Status') ? hash['Status'] : SKIP gross_amount_customer_currency = hash.key?('GrossAmountCustomerCurrency') ? hash['GrossAmountCustomerCurrency'] : SKIP document_reference_number = hash.key?('DocumentReferenceNumber') ? hash['DocumentReferenceNumber'] : SKIP # Create object from extracted values. SearchStatementOfAccount.new(statement_of_account_id, so_a_reference_number, statement_date, payer_id, payer_number, amount_due, amount_overdue, currency_code, currency_symbol, due_date, invoiced_on_behalf_of, status, gross_amount_customer_currency, document_reference_number) end |
.names ⇒ Object
A mapping from model property names to API property names.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 82 def self.names @_hash = {} if @_hash.nil? @_hash['statement_of_account_id'] = 'StatementOfAccountId' @_hash['so_a_reference_number'] = 'SoAReferenceNumber' @_hash['statement_date'] = 'StatementDate' @_hash['payer_id'] = 'PayerId' @_hash['payer_number'] = 'PayerNumber' @_hash['amount_due'] = 'AmountDue' @_hash['amount_overdue'] = 'AmountOverdue' @_hash['currency_code'] = 'CurrencyCode' @_hash['currency_symbol'] = 'CurrencySymbol' @_hash['due_date'] = 'DueDate' @_hash['invoiced_on_behalf_of'] = 'InvoicedOnBehalfOf' @_hash['status'] = 'Status' @_hash['gross_amount_customer_currency'] = 'GrossAmountCustomerCurrency' @_hash['document_reference_number'] = 'DocumentReferenceNumber' @_hash end |
.nullables ⇒ Object
An array for nullable fields
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 122 def self.nullables %w[ statement_of_account_id so_a_reference_number statement_date payer_id payer_number amount_due amount_overdue currency_code currency_symbol due_date invoiced_on_behalf_of status gross_amount_customer_currency document_reference_number ] end |
.optionals ⇒ Object
An array for optional fields
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb', line 102 def self.optionals %w[ statement_of_account_id so_a_reference_number statement_date payer_id payer_number amount_due amount_overdue currency_code currency_symbol due_date invoiced_on_behalf_of status gross_amount_customer_currency document_reference_number ] end |