Class: ShellDataReportingApIs::InvoiceDownloadReq
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::InvoiceDownloadReq
- Defined in:
- lib/shell_data_reporting_ap_is/models/invoice_download_req.rb
Overview
InvoiceDownloadReq Model.
Instance Attribute Summary collapse
-
#account_number ⇒ Array[String]
List of Account Numbers of the invoices.
-
#col_co_code ⇒ Integer
Collecting Company Code of the selected payer.
-
#document_reference ⇒ Array[Integer]
Unique reference ids of invoice document (of zip file).
-
#invoice_or_soa_number ⇒ String
Invoice or the SOA document reference number issued by Card s Platform.
-
#payer_number ⇒ String
Payer Number 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(col_co_code = nil, payer_number = nil, account_number = SKIP, document_reference = SKIP, invoice_or_soa_number = SKIP) ⇒ InvoiceDownloadReq
constructor
A new instance of InvoiceDownloadReq.
Methods inherited from BaseModel
Constructor Details
#initialize(col_co_code = nil, payer_number = nil, account_number = SKIP, document_reference = SKIP, invoice_or_soa_number = SKIP) ⇒ InvoiceDownloadReq
Returns a new instance of InvoiceDownloadReq.
66 67 68 69 70 71 72 73 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_download_req.rb', line 66 def initialize(col_co_code = nil, payer_number = nil, account_number = SKIP, document_reference = SKIP, invoice_or_soa_number = SKIP) @col_co_code = col_co_code @payer_number = payer_number @account_number = account_number unless account_number == SKIP @document_reference = document_reference unless document_reference == SKIP @invoice_or_soa_number = invoice_or_soa_number unless invoice_or_soa_number == SKIP end |
Instance Attribute Details
#account_number ⇒ Array[String]
List of Account Numbers of the invoices. Mandatory for customer users else optional.
26 27 28 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_download_req.rb', line 26 def account_number @account_number end |
#col_co_code ⇒ Integer
Collecting Company Code of the selected payer. Mandatory
15 16 17 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_download_req.rb', line 15 def col_co_code @col_co_code end |
#document_reference ⇒ Array[Integer]
Unique reference ids of invoice document (of zip file). Optional if InvoiceOrSOANumber is passed else Mandatory.
31 32 33 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_download_req.rb', line 31 def document_reference @document_reference end |
#invoice_or_soa_number ⇒ String
Invoice or the SOA document reference number issued by Card s Platform.
35 36 37 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_download_req.rb', line 35 def invoice_or_soa_number @invoice_or_soa_number end |
#payer_number ⇒ String
Payer Number of the selected payer. Mandatory Example: GB000000123
21 22 23 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_download_req.rb', line 21 def payer_number @payer_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_download_req.rb', line 76 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : nil payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : nil account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP document_reference = hash.key?('DocumentReference') ? hash['DocumentReference'] : SKIP invoice_or_soa_number = hash.key?('InvoiceOrSOANumber') ? hash['InvoiceOrSOANumber'] : SKIP # Create object from extracted values. InvoiceDownloadReq.new(col_co_code, payer_number, account_number, document_reference, invoice_or_soa_number) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 44 45 46 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_download_req.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['col_co_code'] = 'ColCoCode' @_hash['payer_number'] = 'PayerNumber' @_hash['account_number'] = 'AccountNumber' @_hash['document_reference'] = 'DocumentReference' @_hash['invoice_or_soa_number'] = 'InvoiceOrSOANumber' @_hash end |
.nullables ⇒ Object
An array for nullable fields
58 59 60 61 62 63 64 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_download_req.rb', line 58 def self.nullables %w[ col_co_code payer_number invoice_or_soa_number ] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_download_req.rb', line 49 def self.optionals %w[ account_number document_reference invoice_or_soa_number ] end |