Class: ShellDataReportingApIs::InvoicesSummaries
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::InvoicesSummaries
- Defined in:
- lib/shell_data_reporting_ap_is/models/invoices_summaries.rb
Overview
InvoicesSummaries Model.
Instance Attribute Summary collapse
-
#amount_due ⇒ Float
Amount due from last summary document date.
-
#amount_not_overdue ⇒ Float
Amount that are due from past summary documents.
-
#amount_overdue ⇒ Float
Amount that are overdue from past summary documents.
-
#amount_paid ⇒ Float
Total amount paid in billing currency.
-
#billing_currency_code ⇒ String
Billing currency ISO code.
-
#billing_currency_symbol ⇒ String
Billing currency symbol.
-
#outstanding_balance ⇒ Float
Current outstanding balance amount.
-
#payment_due_date ⇒ String
Payment due date.
-
#summary_document_date ⇒ String
Summary document date.
-
#total_billing_documents ⇒ Integer
Total number of invoices generated on this date.
-
#total_gross_amount_billing_currency ⇒ Float
Total gross amount in billing currency.
-
#total_net_amount_billing_currency ⇒ Float
Total net amount in billing currency.
-
#total_summary_documents ⇒ Integer
Total number of summary documents generated on this date.
-
#total_vat_amount_billing_currency ⇒ Float
Total VAT amount in billing currency.
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
Methods inherited from BaseModel
Constructor Details
#initialize(amount_due = SKIP, amount_not_overdue = SKIP, amount_overdue = SKIP, amount_paid = SKIP, billing_currency_code = SKIP, billing_currency_symbol = SKIP, outstanding_balance = SKIP, payment_due_date = SKIP, summary_document_date = SKIP, total_billing_documents = SKIP, total_gross_amount_billing_currency = SKIP, total_net_amount_billing_currency = SKIP, total_summary_documents = SKIP, total_vat_amount_billing_currency = SKIP) ⇒ InvoicesSummaries
Returns a new instance of InvoicesSummaries.
134 135 136 137 138 139 140 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 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 134 def initialize(amount_due = SKIP, amount_not_overdue = SKIP, amount_overdue = SKIP, amount_paid = SKIP, billing_currency_code = SKIP, billing_currency_symbol = SKIP, outstanding_balance = SKIP, payment_due_date = SKIP, summary_document_date = SKIP, total_billing_documents = SKIP, total_gross_amount_billing_currency = SKIP, total_net_amount_billing_currency = SKIP, total_summary_documents = SKIP, total_vat_amount_billing_currency = SKIP) @amount_due = amount_due unless amount_due == SKIP @amount_not_overdue = amount_not_overdue unless amount_not_overdue == SKIP @amount_overdue = amount_overdue unless amount_overdue == SKIP @amount_paid = amount_paid unless amount_paid == SKIP @billing_currency_code = billing_currency_code unless billing_currency_code == SKIP @billing_currency_symbol = billing_currency_symbol unless billing_currency_symbol == SKIP @outstanding_balance = outstanding_balance unless outstanding_balance == SKIP @payment_due_date = payment_due_date unless payment_due_date == SKIP @summary_document_date = summary_document_date unless summary_document_date == SKIP @total_billing_documents = total_billing_documents unless total_billing_documents == SKIP unless total_gross_amount_billing_currency == SKIP @total_gross_amount_billing_currency = total_gross_amount_billing_currency end unless total_net_amount_billing_currency == SKIP @total_net_amount_billing_currency = total_net_amount_billing_currency end @total_summary_documents = total_summary_documents unless total_summary_documents == SKIP unless total_vat_amount_billing_currency == SKIP @total_vat_amount_billing_currency = total_vat_amount_billing_currency end end |
Instance Attribute Details
#amount_due ⇒ Float
Amount due from last summary document date.
14 15 16 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 14 def amount_due @amount_due end |
#amount_not_overdue ⇒ Float
Amount that are due from past summary documents.
18 19 20 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 18 def amount_not_overdue @amount_not_overdue end |
#amount_overdue ⇒ Float
Amount that are overdue from past summary documents.
22 23 24 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 22 def amount_overdue @amount_overdue end |
#amount_paid ⇒ Float
Total amount paid in billing currency.
26 27 28 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 26 def amount_paid @amount_paid end |
#billing_currency_code ⇒ String
Billing currency ISO code.
30 31 32 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 30 def billing_currency_code @billing_currency_code end |
#billing_currency_symbol ⇒ String
Billing currency symbol. Example: €
35 36 37 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 35 def billing_currency_symbol @billing_currency_symbol end |
#outstanding_balance ⇒ Float
Current outstanding balance amount
39 40 41 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 39 def outstanding_balance @outstanding_balance end |
#payment_due_date ⇒ String
Payment due date. Format: YYYYMMDD
44 45 46 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 44 def payment_due_date @payment_due_date end |
#summary_document_date ⇒ String
Summary document date. Format: YYYYMMDD
49 50 51 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 49 def summary_document_date @summary_document_date end |
#total_billing_documents ⇒ Integer
Total number of invoices generated on this date.
53 54 55 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 53 def total_billing_documents @total_billing_documents end |
#total_gross_amount_billing_currency ⇒ Float
Total gross amount in billing currency.
57 58 59 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 57 def total_gross_amount_billing_currency @total_gross_amount_billing_currency end |
#total_net_amount_billing_currency ⇒ Float
Total net amount in billing currency.
61 62 63 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 61 def total_net_amount_billing_currency @total_net_amount_billing_currency end |
#total_summary_documents ⇒ Integer
Total number of summary documents generated on this date.
65 66 67 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 65 def total_summary_documents @total_summary_documents end |
#total_vat_amount_billing_currency ⇒ Float
Total VAT amount in billing currency.
69 70 71 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 69 def total_vat_amount_billing_currency @total_vat_amount_billing_currency end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
169 170 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 212 213 214 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 169 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. amount_due = hash.key?('AmountDue') ? hash['AmountDue'] : SKIP amount_not_overdue = hash.key?('AmountNotOverdue') ? hash['AmountNotOverdue'] : SKIP amount_overdue = hash.key?('AmountOverdue') ? hash['AmountOverdue'] : SKIP amount_paid = hash.key?('AmountPaid') ? hash['AmountPaid'] : SKIP billing_currency_code = hash.key?('BillingCurrencyCode') ? hash['BillingCurrencyCode'] : SKIP billing_currency_symbol = hash.key?('BillingCurrencySymbol') ? hash['BillingCurrencySymbol'] : SKIP outstanding_balance = hash.key?('OutstandingBalance') ? hash['OutstandingBalance'] : SKIP payment_due_date = hash.key?('PaymentDueDate') ? hash['PaymentDueDate'] : SKIP summary_document_date = hash.key?('SummaryDocumentDate') ? hash['SummaryDocumentDate'] : SKIP total_billing_documents = hash.key?('TotalBillingDocuments') ? hash['TotalBillingDocuments'] : SKIP total_gross_amount_billing_currency = hash.key?('TotalGrossAmountBillingCurrency') ? hash['TotalGrossAmountBillingCurrency'] : SKIP total_net_amount_billing_currency = hash.key?('TotalNetAmountBillingCurrency') ? hash['TotalNetAmountBillingCurrency'] : SKIP total_summary_documents = hash.key?('TotalSummaryDocuments') ? hash['TotalSummaryDocuments'] : SKIP total_vat_amount_billing_currency = hash.key?('TotalVATAmountBillingCurrency') ? hash['TotalVATAmountBillingCurrency'] : SKIP # Create object from extracted values. InvoicesSummaries.new(amount_due, amount_not_overdue, amount_overdue, amount_paid, billing_currency_code, billing_currency_symbol, outstanding_balance, payment_due_date, summary_document_date, total_billing_documents, total_gross_amount_billing_currency, total_net_amount_billing_currency, total_summary_documents, total_vat_amount_billing_currency) end |
.names ⇒ Object
A mapping from model property names to API property names.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 72 def self.names @_hash = {} if @_hash.nil? @_hash['amount_due'] = 'AmountDue' @_hash['amount_not_overdue'] = 'AmountNotOverdue' @_hash['amount_overdue'] = 'AmountOverdue' @_hash['amount_paid'] = 'AmountPaid' @_hash['billing_currency_code'] = 'BillingCurrencyCode' @_hash['billing_currency_symbol'] = 'BillingCurrencySymbol' @_hash['outstanding_balance'] = 'OutstandingBalance' @_hash['payment_due_date'] = 'PaymentDueDate' @_hash['summary_document_date'] = 'SummaryDocumentDate' @_hash['total_billing_documents'] = 'TotalBillingDocuments' @_hash['total_gross_amount_billing_currency'] = 'TotalGrossAmountBillingCurrency' @_hash['total_net_amount_billing_currency'] = 'TotalNetAmountBillingCurrency' @_hash['total_summary_documents'] = 'TotalSummaryDocuments' @_hash['total_vat_amount_billing_currency'] = 'TotalVATAmountBillingCurrency' @_hash end |
.nullables ⇒ Object
An array for nullable fields
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 115 def self.nullables %w[ amount_due amount_not_overdue amount_overdue amount_paid billing_currency_code billing_currency_symbol outstanding_balance payment_due_date summary_document_date total_billing_documents total_gross_amount_billing_currency total_net_amount_billing_currency total_summary_documents total_vat_amount_billing_currency ] end |
.optionals ⇒ Object
An array for optional fields
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/shell_data_reporting_ap_is/models/invoices_summaries.rb', line 95 def self.optionals %w[ amount_due amount_not_overdue amount_overdue amount_paid billing_currency_code billing_currency_symbol outstanding_balance payment_due_date summary_document_date total_billing_documents total_gross_amount_billing_currency total_net_amount_billing_currency total_summary_documents total_vat_amount_billing_currency ] end |