data-and-reporting-sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +104 -0
  4. data/lib/shell_data_reporting_ap_is/api_helper.rb +10 -0
  5. data/lib/shell_data_reporting_ap_is/client.rb +84 -0
  6. data/lib/shell_data_reporting_ap_is/configuration.rb +110 -0
  7. data/lib/shell_data_reporting_ap_is/controllers/base_controller.rb +66 -0
  8. data/lib/shell_data_reporting_ap_is/controllers/customer_controller.rb +478 -0
  9. data/lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb +470 -0
  10. data/lib/shell_data_reporting_ap_is/controllers/o_auth_authorization_controller.rb +42 -0
  11. data/lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb +878 -0
  12. data/lib/shell_data_reporting_ap_is/exceptions/api_exception.rb +10 -0
  13. data/lib/shell_data_reporting_ap_is/exceptions/default_error_exception.rb +32 -0
  14. data/lib/shell_data_reporting_ap_is/exceptions/error_object_exception.rb +54 -0
  15. data/lib/shell_data_reporting_ap_is/exceptions/error_user_access_error1_exception.rb +32 -0
  16. data/lib/shell_data_reporting_ap_is/exceptions/o_auth_provider_exception.rb +48 -0
  17. data/lib/shell_data_reporting_ap_is/http/auth/basic_auth.rb +50 -0
  18. data/lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb +89 -0
  19. data/lib/shell_data_reporting_ap_is/http/http_call_back.rb +10 -0
  20. data/lib/shell_data_reporting_ap_is/http/http_method_enum.rb +10 -0
  21. data/lib/shell_data_reporting_ap_is/http/http_request.rb +10 -0
  22. data/lib/shell_data_reporting_ap_is/http/http_response.rb +10 -0
  23. data/lib/shell_data_reporting_ap_is/models/account_access.rb +128 -0
  24. data/lib/shell_data_reporting_ap_is/models/account_request.rb +252 -0
  25. data/lib/shell_data_reporting_ap_is/models/account_response.rb +111 -0
  26. data/lib/shell_data_reporting_ap_is/models/account_response_accounts_items.rb +750 -0
  27. data/lib/shell_data_reporting_ap_is/models/accounts.rb +65 -0
  28. data/lib/shell_data_reporting_ap_is/models/address.rb +174 -0
  29. data/lib/shell_data_reporting_ap_is/models/associated_account.rb +98 -0
  30. data/lib/shell_data_reporting_ap_is/models/audit_request.rb +256 -0
  31. data/lib/shell_data_reporting_ap_is/models/audit_response.rb +111 -0
  32. data/lib/shell_data_reporting_ap_is/models/audit_response_audits_items.rb +450 -0
  33. data/lib/shell_data_reporting_ap_is/models/bank_account.rb +192 -0
  34. data/lib/shell_data_reporting_ap_is/models/base_model.rb +62 -0
  35. data/lib/shell_data_reporting_ap_is/models/bonus_configuration.rb +419 -0
  36. data/lib/shell_data_reporting_ap_is/models/bonus_history.rb +444 -0
  37. data/lib/shell_data_reporting_ap_is/models/card_day_time_restrictions.rb +159 -0
  38. data/lib/shell_data_reporting_ap_is/models/card_exceptions.rb +268 -0
  39. data/lib/shell_data_reporting_ap_is/models/card_group_request.rb +178 -0
  40. data/lib/shell_data_reporting_ap_is/models/card_group_response.rb +109 -0
  41. data/lib/shell_data_reporting_ap_is/models/card_group_response_card_groups_items.rb +301 -0
  42. data/lib/shell_data_reporting_ap_is/models/card_type_request.rb +145 -0
  43. data/lib/shell_data_reporting_ap_is/models/card_type_response.rb +79 -0
  44. data/lib/shell_data_reporting_ap_is/models/card_type_response_customer_card_types_items.rb +470 -0
  45. data/lib/shell_data_reporting_ap_is/models/card_type_response_error.rb +60 -0
  46. data/lib/shell_data_reporting_ap_is/models/card_usage_restrictions.rb +281 -0
  47. data/lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb +159 -0
  48. data/lib/shell_data_reporting_ap_is/models/card_usage_summary_response.rb +79 -0
  49. data/lib/shell_data_reporting_ap_is/models/col_co_access.rb +88 -0
  50. data/lib/shell_data_reporting_ap_is/models/current_volume.rb +99 -0
  51. data/lib/shell_data_reporting_ap_is/models/customer_contract.rb +63 -0
  52. data/lib/shell_data_reporting_ap_is/models/customer_detail_request.rb +123 -0
  53. data/lib/shell_data_reporting_ap_is/models/customer_detail_response.rb +437 -0
  54. data/lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb +200 -0
  55. data/lib/shell_data_reporting_ap_is/models/customer_price_list_response.rb +82 -0
  56. data/lib/shell_data_reporting_ap_is/models/default_error_fault.rb +60 -0
  57. data/lib/shell_data_reporting_ap_is/models/default_error_fault_detail.rb +50 -0
  58. data/lib/shell_data_reporting_ap_is/models/delivery_addresses.rb +258 -0
  59. data/lib/shell_data_reporting_ap_is/models/eid_access.rb +75 -0
  60. data/lib/shell_data_reporting_ap_is/models/eid_document.rb +166 -0
  61. data/lib/shell_data_reporting_ap_is/models/eid_document_response.rb +140 -0
  62. data/lib/shell_data_reporting_ap_is/models/eid_download_req.rb +86 -0
  63. data/lib/shell_data_reporting_ap_is/models/eid_download_request.rb +50 -0
  64. data/lib/shell_data_reporting_ap_is/models/eid_search_req.rb +160 -0
  65. data/lib/shell_data_reporting_ap_is/models/eid_search_request.rb +70 -0
  66. data/lib/shell_data_reporting_ap_is/models/error_details.rb +81 -0
  67. data/lib/shell_data_reporting_ap_is/models/error_status.rb +60 -0
  68. data/lib/shell_data_reporting_ap_is/models/error_user_access.rb +50 -0
  69. data/lib/shell_data_reporting_ap_is/models/error_user_access_error.rb +60 -0
  70. data/lib/shell_data_reporting_ap_is/models/exception_product.rb +65 -0
  71. data/lib/shell_data_reporting_ap_is/models/exception_site_location.rb +63 -0
  72. data/lib/shell_data_reporting_ap_is/models/fee_item.rb +977 -0
  73. data/lib/shell_data_reporting_ap_is/models/fee_item_summary_all_of0.rb +194 -0
  74. data/lib/shell_data_reporting_ap_is/models/fee_rule_location.rb +153 -0
  75. data/lib/shell_data_reporting_ap_is/models/fee_rule_product.rb +98 -0
  76. data/lib/shell_data_reporting_ap_is/models/fee_rule_tier.rb +74 -0
  77. data/lib/shell_data_reporting_ap_is/models/fee_summary_response.rb +85 -0
  78. data/lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb +124 -0
  79. data/lib/shell_data_reporting_ap_is/models/finance_currency.rb +98 -0
  80. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_card.rb +73 -0
  81. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_data.rb +267 -0
  82. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_request.rb +197 -0
  83. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_response.rb +79 -0
  84. data/lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb +62 -0
  85. data/lib/shell_data_reporting_ap_is/models/invoice_dates_request.rb +50 -0
  86. data/lib/shell_data_reporting_ap_is/models/invoice_dates_request_filters.rb +146 -0
  87. data/lib/shell_data_reporting_ap_is/models/invoice_dates_response_data.rb +80 -0
  88. data/lib/shell_data_reporting_ap_is/models/invoice_distribution_method.rb +99 -0
  89. data/lib/shell_data_reporting_ap_is/models/invoice_download_req.rb +99 -0
  90. data/lib/shell_data_reporting_ap_is/models/invoice_download_request.rb +50 -0
  91. data/lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb +80 -0
  92. data/lib/shell_data_reporting_ap_is/models/invoice_search_details.rb +913 -0
  93. data/lib/shell_data_reporting_ap_is/models/invoice_search_request.rb +91 -0
  94. data/lib/shell_data_reporting_ap_is/models/invoice_search_request_filters.rb +344 -0
  95. data/lib/shell_data_reporting_ap_is/models/invoice_search_response.rb +127 -0
  96. data/lib/shell_data_reporting_ap_is/models/invoice_summary_details.rb +129 -0
  97. data/lib/shell_data_reporting_ap_is/models/invoice_summary_request.rb +50 -0
  98. data/lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb +345 -0
  99. data/lib/shell_data_reporting_ap_is/models/invoice_summary_response.rb +79 -0
  100. data/lib/shell_data_reporting_ap_is/models/invoices_summaries.rb +221 -0
  101. data/lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb +421 -0
  102. data/lib/shell_data_reporting_ap_is/models/logged_in_user_request.rb +107 -0
  103. data/lib/shell_data_reporting_ap_is/models/logged_in_user_response.rb +394 -0
  104. data/lib/shell_data_reporting_ap_is/models/monthly_invoice_trend.rb +112 -0
  105. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb +360 -0
  106. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb +84 -0
  107. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response.rb +110 -0
  108. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response_transactions_items.rb +1724 -0
  109. data/lib/shell_data_reporting_ap_is/models/o_auth_provider_error_enum.rb +45 -0
  110. data/lib/shell_data_reporting_ap_is/models/o_auth_token.rb +100 -0
  111. data/lib/shell_data_reporting_ap_is/models/past_statement_of_accounts.rb +502 -0
  112. data/lib/shell_data_reporting_ap_is/models/payer_access.rb +147 -0
  113. data/lib/shell_data_reporting_ap_is/models/payer_details.rb +1412 -0
  114. data/lib/shell_data_reporting_ap_is/models/payer_request.rb +126 -0
  115. data/lib/shell_data_reporting_ap_is/models/payer_response.rb +115 -0
  116. data/lib/shell_data_reporting_ap_is/models/payers.rb +109 -0
  117. data/lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb +322 -0
  118. data/lib/shell_data_reporting_ap_is/models/pin_advice_types.rb +80 -0
  119. data/lib/shell_data_reporting_ap_is/models/price_list.rb +485 -0
  120. data/lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb +477 -0
  121. data/lib/shell_data_reporting_ap_is/models/price_transaction_request.rb +572 -0
  122. data/lib/shell_data_reporting_ap_is/models/priced_request_data.rb +485 -0
  123. data/lib/shell_data_reporting_ap_is/models/priced_response_data.rb +2132 -0
  124. data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response.rb +79 -0
  125. data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response_transactions_summary_items.rb +242 -0
  126. data/lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb +67 -0
  127. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_invoice_status_enum.rb +27 -0
  128. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_period_enum.rb +27 -0
  129. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_sort_order_enum.rb +37 -0
  130. data/lib/shell_data_reporting_ap_is/models/priced_transaction_request_v2.rb +72 -0
  131. data/lib/shell_data_reporting_ap_is/models/priced_transaction_resp_v2_refund_flag_enum.rb +23 -0
  132. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response.rb +59 -0
  133. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_transactions_items.rb +1719 -0
  134. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_v2.rb +110 -0
  135. data/lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb +115 -0
  136. data/lib/shell_data_reporting_ap_is/models/pricing_history.rb +105 -0
  137. data/lib/shell_data_reporting_ap_is/models/purchase_categories.rb +114 -0
  138. data/lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb +217 -0
  139. data/lib/shell_data_reporting_ap_is/models/recent_transaction_request.rb +66 -0
  140. data/lib/shell_data_reporting_ap_is/models/recent_transactions.rb +918 -0
  141. data/lib/shell_data_reporting_ap_is/models/recent_transactions_response.rb +110 -0
  142. data/lib/shell_data_reporting_ap_is/models/role.rb +102 -0
  143. data/lib/shell_data_reporting_ap_is/models/search_doc_req.rb +269 -0
  144. data/lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb +204 -0
  145. data/lib/shell_data_reporting_ap_is/models/search_documents_request.rb +70 -0
  146. data/lib/shell_data_reporting_ap_is/models/search_documents_response.rb +122 -0
  147. data/lib/shell_data_reporting_ap_is/models/search_soa_req.rb +197 -0
  148. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb +220 -0
  149. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_request.rb +70 -0
  150. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_response.rb +120 -0
  151. data/lib/shell_data_reporting_ap_is/models/site_location.rb +67 -0
  152. data/lib/shell_data_reporting_ap_is/models/statement_of_account_request.rb +50 -0
  153. data/lib/shell_data_reporting_ap_is/models/statement_of_account_request_filters.rb +197 -0
  154. data/lib/shell_data_reporting_ap_is/models/statement_of_account_resp.rb +138 -0
  155. data/lib/shell_data_reporting_ap_is/models/statement_of_account_response.rb +80 -0
  156. data/lib/shell_data_reporting_ap_is/models/tier.rb +167 -0
  157. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions.rb +1267 -0
  158. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb +267 -0
  159. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb +100 -0
  160. data/lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb +348 -0
  161. data/lib/shell_data_reporting_ap_is/models/transaction_fees_response.rb +111 -0
  162. data/lib/shell_data_reporting_ap_is/models/update_odometer.rb +62 -0
  163. data/lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb +67 -0
  164. data/lib/shell_data_reporting_ap_is/models/update_odometer_request.rb +146 -0
  165. data/lib/shell_data_reporting_ap_is/models/update_odometer_response.rb +93 -0
  166. data/lib/shell_data_reporting_ap_is/models/usage_summary.rb +202 -0
  167. data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb +118 -0
  168. data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_response.rb +120 -0
  169. data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_request.rb +103 -0
  170. data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_response.rb +120 -0
  171. data/lib/shell_data_reporting_ap_is/utilities/date_time_helper.rb +11 -0
  172. data/lib/shell_data_reporting_ap_is/utilities/file_wrapper.rb +16 -0
  173. data/lib/shell_data_reporting_ap_is.rb +229 -0
  174. data/test/controllers/controller_test_base.rb +34 -0
  175. data/test/controllers/test_invoice_controller.rb +398 -0
  176. data/test/controllers/test_transaction_controller.rb +235 -0
  177. data/test/http_response_catcher.rb +19 -0
  178. metadata +302 -0
@@ -0,0 +1,50 @@
1
+ # shell_data_reporting_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellDataReportingApIs
7
+ # InvoiceSummaryRequest Model.
8
+ class InvoiceSummaryRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [InvoiceSummaryRequestFilters]
14
+ attr_accessor :filters
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['filters'] = 'Filters'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ filters
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(filters = SKIP)
36
+ @filters = filters unless filters == SKIP
37
+ end
38
+
39
+ # Creates an instance of the object from a hash.
40
+ def self.from_hash(hash)
41
+ return nil unless hash
42
+
43
+ # Extract variables from the hash.
44
+ filters = InvoiceSummaryRequestFilters.from_hash(hash['Filters']) if hash['Filters']
45
+
46
+ # Create object from extracted values.
47
+ InvoiceSummaryRequest.new(filters)
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,345 @@
1
+ # shell_data_reporting_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellDataReportingApIs
7
+ # InvoiceSummaryRequestFilters Model.
8
+ class InvoiceSummaryRequestFilters < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Collecting Company Id of the selected payer.
13
+ # Optional.
14
+ # Example:
15
+ # 1-Philippines
16
+ # 5-UK
17
+ # @return [Integer]
18
+ attr_accessor :col_co_id
19
+
20
+ # Payer Id of the selected payer.
21
+ # Optional if PayerNumber is passed else Mandatory
22
+ # Example: 123456
23
+ # @return [Integer]
24
+ attr_accessor :payer_id
25
+
26
+ # Payer Number of the selected payer.
27
+ # Optional if PayerId is passed else Mandatory
28
+ # Example: GB000000123
29
+ # @return [String]
30
+ attr_accessor :payer_number
31
+
32
+ # Invoice id.
33
+ # Optional.
34
+ # This input is a search criterion, if given.
35
+ # Example: 1
36
+ # @return [Integer]
37
+ attr_accessor :invoice_id
38
+
39
+ # Invoice number.
40
+ # Optional.
41
+ # This input is a search criterion, if given.
42
+ # Example: 0123456789
43
+ # @return [String]
44
+ attr_accessor :invoice_number
45
+
46
+ # Invoice date searched from this date.
47
+ # Optional.
48
+ # This input is a search criterion, if given.
49
+ # Date format: yyyyMMdd
50
+ # Example: 20170830
51
+ # Note: This criterion is ignored if ‘Period’ is given.
52
+ # Also, this criterion is ignored if ‘ToDate’ is not provided.
53
+ # @return [String]
54
+ attr_accessor :from_date
55
+
56
+ # Invoice date searched until this date.
57
+ # Optional.
58
+ # This input is a search criterion, if given.
59
+ # Date format: yyyyMMdd
60
+ # Example: 20170830
61
+ # Note: This criterion is ignored if ‘Period’ is given.
62
+ # Also, this criterion is ignored if ‘FromDate’ is not provided.
63
+ # @return [String]
64
+ attr_accessor :to_date
65
+
66
+ # Date of invoicing.
67
+ # Optional.
68
+ # This input is a search criterion, if given.
69
+ # Date format: yyyyMMdd
70
+ # Example: 20170830
71
+ # @return [String]
72
+ attr_accessor :invoice_date
73
+
74
+ # Summary document id
75
+ # Optional.
76
+ # This input is a search criterion, if given.
77
+ # Example: 1
78
+ # @return [Integer]
79
+ attr_accessor :summary_document_id
80
+
81
+ # Summary document number
82
+ # Optional.
83
+ # This input is a search criterion, if given.
84
+ # Example: ‘0/CZ0000000123456/2017’
85
+ # @return [String]
86
+ attr_accessor :summary_document_number
87
+
88
+ # Statement of Account Id of the payment customer.
89
+ # Optional.
90
+ # This input is a search criterion, if given.
91
+ # Example: 1
92
+ # @return [String]
93
+ attr_accessor :statement_of_account_id
94
+
95
+ # Statement of Account reference number of the payment customer.
96
+ # Optional.
97
+ # This input is a search criterion, if given.
98
+ # Example: 123
99
+ # @return [String]
100
+ attr_accessor :so_a_reference_number
101
+
102
+ # Invoice date search period. Valid values –
103
+ # 1. Last 7 days – Issued in last 7 days.
104
+ # 2. Last 30 days – Issued in last 30 days.
105
+ # 3. Last 90 days – Issued in last 90 days.
106
+ # Optional.
107
+ # This input is a search criterion, if given.
108
+ # Example: 1
109
+ # @return [Integer]
110
+ attr_accessor :period
111
+
112
+ # Status of the invoice. Valid values –
113
+ # • Due – Invoices due for payment and is within the due date.
114
+ # • Paid – Fully paid Invoices.
115
+ # • Overdue – Invoices due of payment and has crossed the due date.
116
+ # • CreditNote – Credit notes
117
+ # • CreditStatement
118
+ # Optional.
119
+ # This input is a search criterion, if given.
120
+ # @return [String]
121
+ attr_accessor :invoice_status
122
+
123
+ # ISO code of the country i.e., UK, DE, MY, etc.
124
+ # Optional
125
+ # @return [String]
126
+ attr_accessor :invoiced_on_behalf_of
127
+
128
+ # Whether to include the additional invoice details in the API response.
129
+ # Optional. Default value “False”.
130
+ # The parameters that are populated
131
+ # • DocumentReference
132
+ # • AdditionalDocuments
133
+ # The above fields will not be present in the response when the respective
134
+ # data is not available in the source system.
135
+ # @return [TrueClass | FalseClass]
136
+ attr_accessor :include_e_invoice_details
137
+
138
+ # Collecting Company Code of the selected payer.
139
+ # Mandatory - It is mandatory field to external source ATOS for E-invoicing.
140
+ #
141
+ # Example:
142
+ # 86-Philippines
143
+ # 5-UK
144
+ # @return [Integer]
145
+ attr_accessor :col_co_code
146
+
147
+ # Collecting Company Code of the selected payer.
148
+ # Mandatory - It is mandatory field to external source ATOS for E-invoicing.
149
+ #
150
+ # Example:
151
+ # 86-Philippines
152
+ # 5-UK
153
+ # @return [Array[Accounts]]
154
+ attr_accessor :accounts
155
+
156
+ # Invoice type. Allowed values –
157
+ # • Original – Original document.
158
+ # • Reversal – Reversed document.
159
+ # • Replacement – Replaced document.
160
+ # Optional. (When not passed all invoice, types are considered for search)
161
+ # This input is a search criterion, if given.
162
+ # Example: Original
163
+ # @return [String]
164
+ attr_accessor :type
165
+
166
+ # A mapping from model property names to API property names.
167
+ def self.names
168
+ @_hash = {} if @_hash.nil?
169
+ @_hash['col_co_id'] = 'ColCoId'
170
+ @_hash['payer_id'] = 'PayerId'
171
+ @_hash['payer_number'] = 'PayerNumber'
172
+ @_hash['invoice_id'] = 'InvoiceId'
173
+ @_hash['invoice_number'] = 'InvoiceNumber'
174
+ @_hash['from_date'] = 'FromDate'
175
+ @_hash['to_date'] = 'ToDate'
176
+ @_hash['invoice_date'] = 'InvoiceDate'
177
+ @_hash['summary_document_id'] = 'SummaryDocumentId'
178
+ @_hash['summary_document_number'] = 'SummaryDocumentNumber'
179
+ @_hash['statement_of_account_id'] = 'StatementOfAccountId'
180
+ @_hash['so_a_reference_number'] = 'SoAReferenceNumber'
181
+ @_hash['period'] = 'Period'
182
+ @_hash['invoice_status'] = 'InvoiceStatus'
183
+ @_hash['invoiced_on_behalf_of'] = 'InvoicedOnBehalfOf'
184
+ @_hash['include_e_invoice_details'] = 'IncludeEInvoiceDetails'
185
+ @_hash['col_co_code'] = 'ColCoCode'
186
+ @_hash['accounts'] = 'Accounts'
187
+ @_hash['type'] = 'Type'
188
+ @_hash
189
+ end
190
+
191
+ # An array for optional fields
192
+ def self.optionals
193
+ %w[
194
+ col_co_id
195
+ payer_id
196
+ payer_number
197
+ invoice_id
198
+ invoice_number
199
+ from_date
200
+ to_date
201
+ invoice_date
202
+ summary_document_id
203
+ summary_document_number
204
+ statement_of_account_id
205
+ so_a_reference_number
206
+ period
207
+ invoice_status
208
+ invoiced_on_behalf_of
209
+ include_e_invoice_details
210
+ col_co_code
211
+ accounts
212
+ type
213
+ ]
214
+ end
215
+
216
+ # An array for nullable fields
217
+ def self.nullables
218
+ %w[
219
+ col_co_id
220
+ payer_id
221
+ payer_number
222
+ invoice_id
223
+ invoice_number
224
+ from_date
225
+ to_date
226
+ invoice_date
227
+ summary_document_id
228
+ summary_document_number
229
+ statement_of_account_id
230
+ so_a_reference_number
231
+ period
232
+ invoice_status
233
+ invoiced_on_behalf_of
234
+ include_e_invoice_details
235
+ col_co_code
236
+ type
237
+ ]
238
+ end
239
+
240
+ def initialize(col_co_id = SKIP,
241
+ payer_id = SKIP,
242
+ payer_number = SKIP,
243
+ invoice_id = SKIP,
244
+ invoice_number = SKIP,
245
+ from_date = SKIP,
246
+ to_date = SKIP,
247
+ invoice_date = SKIP,
248
+ summary_document_id = SKIP,
249
+ summary_document_number = SKIP,
250
+ statement_of_account_id = SKIP,
251
+ so_a_reference_number = SKIP,
252
+ period = SKIP,
253
+ invoice_status = SKIP,
254
+ invoiced_on_behalf_of = SKIP,
255
+ include_e_invoice_details = SKIP,
256
+ col_co_code = SKIP,
257
+ accounts = SKIP,
258
+ type = SKIP)
259
+ @col_co_id = col_co_id unless col_co_id == SKIP
260
+ @payer_id = payer_id unless payer_id == SKIP
261
+ @payer_number = payer_number unless payer_number == SKIP
262
+ @invoice_id = invoice_id unless invoice_id == SKIP
263
+ @invoice_number = invoice_number unless invoice_number == SKIP
264
+ @from_date = from_date unless from_date == SKIP
265
+ @to_date = to_date unless to_date == SKIP
266
+ @invoice_date = invoice_date unless invoice_date == SKIP
267
+ @summary_document_id = summary_document_id unless summary_document_id == SKIP
268
+ @summary_document_number = summary_document_number unless summary_document_number == SKIP
269
+ @statement_of_account_id = statement_of_account_id unless statement_of_account_id == SKIP
270
+ @so_a_reference_number = so_a_reference_number unless so_a_reference_number == SKIP
271
+ @period = period unless period == SKIP
272
+ @invoice_status = invoice_status unless invoice_status == SKIP
273
+ @invoiced_on_behalf_of = invoiced_on_behalf_of unless invoiced_on_behalf_of == SKIP
274
+ unless include_e_invoice_details == SKIP
275
+ @include_e_invoice_details =
276
+ include_e_invoice_details
277
+ end
278
+ @col_co_code = col_co_code unless col_co_code == SKIP
279
+ @accounts = accounts unless accounts == SKIP
280
+ @type = type unless type == SKIP
281
+ end
282
+
283
+ # Creates an instance of the object from a hash.
284
+ def self.from_hash(hash)
285
+ return nil unless hash
286
+
287
+ # Extract variables from the hash.
288
+ col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
289
+ payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
290
+ payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
291
+ invoice_id = hash.key?('InvoiceId') ? hash['InvoiceId'] : SKIP
292
+ invoice_number = hash.key?('InvoiceNumber') ? hash['InvoiceNumber'] : SKIP
293
+ from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
294
+ to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP
295
+ invoice_date = hash.key?('InvoiceDate') ? hash['InvoiceDate'] : SKIP
296
+ summary_document_id =
297
+ hash.key?('SummaryDocumentId') ? hash['SummaryDocumentId'] : SKIP
298
+ summary_document_number =
299
+ hash.key?('SummaryDocumentNumber') ? hash['SummaryDocumentNumber'] : SKIP
300
+ statement_of_account_id =
301
+ hash.key?('StatementOfAccountId') ? hash['StatementOfAccountId'] : SKIP
302
+ so_a_reference_number =
303
+ hash.key?('SoAReferenceNumber') ? hash['SoAReferenceNumber'] : SKIP
304
+ period = hash.key?('Period') ? hash['Period'] : SKIP
305
+ invoice_status = hash.key?('InvoiceStatus') ? hash['InvoiceStatus'] : SKIP
306
+ invoiced_on_behalf_of =
307
+ hash.key?('InvoicedOnBehalfOf') ? hash['InvoicedOnBehalfOf'] : SKIP
308
+ include_e_invoice_details =
309
+ hash.key?('IncludeEInvoiceDetails') ? hash['IncludeEInvoiceDetails'] : SKIP
310
+ col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
311
+ # Parameter is an array, so we need to iterate through it
312
+ accounts = nil
313
+ unless hash['Accounts'].nil?
314
+ accounts = []
315
+ hash['Accounts'].each do |structure|
316
+ accounts << (Accounts.from_hash(structure) if structure)
317
+ end
318
+ end
319
+
320
+ accounts = SKIP unless hash.key?('Accounts')
321
+ type = hash.key?('Type') ? hash['Type'] : SKIP
322
+
323
+ # Create object from extracted values.
324
+ InvoiceSummaryRequestFilters.new(col_co_id,
325
+ payer_id,
326
+ payer_number,
327
+ invoice_id,
328
+ invoice_number,
329
+ from_date,
330
+ to_date,
331
+ invoice_date,
332
+ summary_document_id,
333
+ summary_document_number,
334
+ statement_of_account_id,
335
+ so_a_reference_number,
336
+ period,
337
+ invoice_status,
338
+ invoiced_on_behalf_of,
339
+ include_e_invoice_details,
340
+ col_co_code,
341
+ accounts,
342
+ type)
343
+ end
344
+ end
345
+ end
@@ -0,0 +1,79 @@
1
+ # shell_data_reporting_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellDataReportingApIs
7
+ # InvoiceSummaryResponse Model.
8
+ class InvoiceSummaryResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # API Request Id
13
+ # @return [String]
14
+ attr_accessor :request_id
15
+
16
+ # Indicates overall status of the request. Allowed values: SUCCES, FAILED
17
+ # @return [String]
18
+ attr_accessor :status
19
+
20
+ # Indicates overall status of the request. Allowed values: SUCCES, FAILED
21
+ # @return [Array[InvoiceSummaryDetails]]
22
+ attr_accessor :data
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['request_id'] = 'RequestId'
28
+ @_hash['status'] = 'Status'
29
+ @_hash['data'] = 'Data'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ %w[
36
+ request_id
37
+ status
38
+ data
39
+ ]
40
+ end
41
+
42
+ # An array for nullable fields
43
+ def self.nullables
44
+ []
45
+ end
46
+
47
+ def initialize(request_id = SKIP,
48
+ status = SKIP,
49
+ data = SKIP)
50
+ @request_id = request_id unless request_id == SKIP
51
+ @status = status unless status == SKIP
52
+ @data = data unless data == SKIP
53
+ end
54
+
55
+ # Creates an instance of the object from a hash.
56
+ def self.from_hash(hash)
57
+ return nil unless hash
58
+
59
+ # Extract variables from the hash.
60
+ request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
61
+ status = hash.key?('Status') ? hash['Status'] : SKIP
62
+ # Parameter is an array, so we need to iterate through it
63
+ data = nil
64
+ unless hash['Data'].nil?
65
+ data = []
66
+ hash['Data'].each do |structure|
67
+ data << (InvoiceSummaryDetails.from_hash(structure) if structure)
68
+ end
69
+ end
70
+
71
+ data = SKIP unless hash.key?('Data')
72
+
73
+ # Create object from extracted values.
74
+ InvoiceSummaryResponse.new(request_id,
75
+ status,
76
+ data)
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,221 @@
1
+ # shell_data_reporting_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellDataReportingApIs
7
+ # InvoicesSummaries Model.
8
+ class InvoicesSummaries < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Amount due from last summary document date.
13
+ # @return [Float]
14
+ attr_accessor :amount_due
15
+
16
+ # Amount that are due from past summary documents.
17
+ # @return [Float]
18
+ attr_accessor :amount_not_overdue
19
+
20
+ # Amount that are overdue from past summary documents.
21
+ # @return [Float]
22
+ attr_accessor :amount_overdue
23
+
24
+ # Total amount paid in billing currency.
25
+ # @return [Float]
26
+ attr_accessor :amount_paid
27
+
28
+ # Billing currency ISO code.
29
+ # @return [String]
30
+ attr_accessor :billing_currency_code
31
+
32
+ # Billing currency symbol.
33
+ # Example: €
34
+ # @return [String]
35
+ attr_accessor :billing_currency_symbol
36
+
37
+ # Current outstanding balance amount
38
+ # @return [Float]
39
+ attr_accessor :outstanding_balance
40
+
41
+ # Payment due date.
42
+ # Format: YYYYMMDD
43
+ # @return [String]
44
+ attr_accessor :payment_due_date
45
+
46
+ # Summary document date.
47
+ # Format: YYYYMMDD
48
+ # @return [String]
49
+ attr_accessor :summary_document_date
50
+
51
+ # Total number of invoices generated on this date.
52
+ # @return [Integer]
53
+ attr_accessor :total_billing_documents
54
+
55
+ # Total gross amount in billing currency.
56
+ # @return [Float]
57
+ attr_accessor :total_gross_amount_billing_currency
58
+
59
+ # Total net amount in billing currency.
60
+ # @return [Float]
61
+ attr_accessor :total_net_amount_billing_currency
62
+
63
+ # Total number of summary documents generated on this date.
64
+ # @return [Integer]
65
+ attr_accessor :total_summary_documents
66
+
67
+ # Total VAT amount in billing currency.
68
+ # @return [Float]
69
+ attr_accessor :total_vat_amount_billing_currency
70
+
71
+ # A mapping from model property names to API property names.
72
+ def self.names
73
+ @_hash = {} if @_hash.nil?
74
+ @_hash['amount_due'] = 'AmountDue'
75
+ @_hash['amount_not_overdue'] = 'AmountNotOverdue'
76
+ @_hash['amount_overdue'] = 'AmountOverdue'
77
+ @_hash['amount_paid'] = 'AmountPaid'
78
+ @_hash['billing_currency_code'] = 'BillingCurrencyCode'
79
+ @_hash['billing_currency_symbol'] = 'BillingCurrencySymbol'
80
+ @_hash['outstanding_balance'] = 'OutstandingBalance'
81
+ @_hash['payment_due_date'] = 'PaymentDueDate'
82
+ @_hash['summary_document_date'] = 'SummaryDocumentDate'
83
+ @_hash['total_billing_documents'] = 'TotalBillingDocuments'
84
+ @_hash['total_gross_amount_billing_currency'] =
85
+ 'TotalGrossAmountBillingCurrency'
86
+ @_hash['total_net_amount_billing_currency'] =
87
+ 'TotalNetAmountBillingCurrency'
88
+ @_hash['total_summary_documents'] = 'TotalSummaryDocuments'
89
+ @_hash['total_vat_amount_billing_currency'] =
90
+ 'TotalVATAmountBillingCurrency'
91
+ @_hash
92
+ end
93
+
94
+ # An array for optional fields
95
+ def self.optionals
96
+ %w[
97
+ amount_due
98
+ amount_not_overdue
99
+ amount_overdue
100
+ amount_paid
101
+ billing_currency_code
102
+ billing_currency_symbol
103
+ outstanding_balance
104
+ payment_due_date
105
+ summary_document_date
106
+ total_billing_documents
107
+ total_gross_amount_billing_currency
108
+ total_net_amount_billing_currency
109
+ total_summary_documents
110
+ total_vat_amount_billing_currency
111
+ ]
112
+ end
113
+
114
+ # An array for nullable fields
115
+ def self.nullables
116
+ %w[
117
+ amount_due
118
+ amount_not_overdue
119
+ amount_overdue
120
+ amount_paid
121
+ billing_currency_code
122
+ billing_currency_symbol
123
+ outstanding_balance
124
+ payment_due_date
125
+ summary_document_date
126
+ total_billing_documents
127
+ total_gross_amount_billing_currency
128
+ total_net_amount_billing_currency
129
+ total_summary_documents
130
+ total_vat_amount_billing_currency
131
+ ]
132
+ end
133
+
134
+ def initialize(amount_due = SKIP,
135
+ amount_not_overdue = SKIP,
136
+ amount_overdue = SKIP,
137
+ amount_paid = SKIP,
138
+ billing_currency_code = SKIP,
139
+ billing_currency_symbol = SKIP,
140
+ outstanding_balance = SKIP,
141
+ payment_due_date = SKIP,
142
+ summary_document_date = SKIP,
143
+ total_billing_documents = SKIP,
144
+ total_gross_amount_billing_currency = SKIP,
145
+ total_net_amount_billing_currency = SKIP,
146
+ total_summary_documents = SKIP,
147
+ total_vat_amount_billing_currency = SKIP)
148
+ @amount_due = amount_due unless amount_due == SKIP
149
+ @amount_not_overdue = amount_not_overdue unless amount_not_overdue == SKIP
150
+ @amount_overdue = amount_overdue unless amount_overdue == SKIP
151
+ @amount_paid = amount_paid unless amount_paid == SKIP
152
+ @billing_currency_code = billing_currency_code unless billing_currency_code == SKIP
153
+ @billing_currency_symbol = billing_currency_symbol unless billing_currency_symbol == SKIP
154
+ @outstanding_balance = outstanding_balance unless outstanding_balance == SKIP
155
+ @payment_due_date = payment_due_date unless payment_due_date == SKIP
156
+ @summary_document_date = summary_document_date unless summary_document_date == SKIP
157
+ @total_billing_documents = total_billing_documents unless total_billing_documents == SKIP
158
+ unless total_gross_amount_billing_currency == SKIP
159
+ @total_gross_amount_billing_currency =
160
+ total_gross_amount_billing_currency
161
+ end
162
+ unless total_net_amount_billing_currency == SKIP
163
+ @total_net_amount_billing_currency =
164
+ total_net_amount_billing_currency
165
+ end
166
+ @total_summary_documents = total_summary_documents unless total_summary_documents == SKIP
167
+ unless total_vat_amount_billing_currency == SKIP
168
+ @total_vat_amount_billing_currency =
169
+ total_vat_amount_billing_currency
170
+ end
171
+ end
172
+
173
+ # Creates an instance of the object from a hash.
174
+ def self.from_hash(hash)
175
+ return nil unless hash
176
+
177
+ # Extract variables from the hash.
178
+ amount_due = hash.key?('AmountDue') ? hash['AmountDue'] : SKIP
179
+ amount_not_overdue =
180
+ hash.key?('AmountNotOverdue') ? hash['AmountNotOverdue'] : SKIP
181
+ amount_overdue = hash.key?('AmountOverdue') ? hash['AmountOverdue'] : SKIP
182
+ amount_paid = hash.key?('AmountPaid') ? hash['AmountPaid'] : SKIP
183
+ billing_currency_code =
184
+ hash.key?('BillingCurrencyCode') ? hash['BillingCurrencyCode'] : SKIP
185
+ billing_currency_symbol =
186
+ hash.key?('BillingCurrencySymbol') ? hash['BillingCurrencySymbol'] : SKIP
187
+ outstanding_balance =
188
+ hash.key?('OutstandingBalance') ? hash['OutstandingBalance'] : SKIP
189
+ payment_due_date =
190
+ hash.key?('PaymentDueDate') ? hash['PaymentDueDate'] : SKIP
191
+ summary_document_date =
192
+ hash.key?('SummaryDocumentDate') ? hash['SummaryDocumentDate'] : SKIP
193
+ total_billing_documents =
194
+ hash.key?('TotalBillingDocuments') ? hash['TotalBillingDocuments'] : SKIP
195
+ total_gross_amount_billing_currency =
196
+ hash.key?('TotalGrossAmountBillingCurrency') ? hash['TotalGrossAmountBillingCurrency'] : SKIP
197
+ total_net_amount_billing_currency =
198
+ hash.key?('TotalNetAmountBillingCurrency') ? hash['TotalNetAmountBillingCurrency'] : SKIP
199
+ total_summary_documents =
200
+ hash.key?('TotalSummaryDocuments') ? hash['TotalSummaryDocuments'] : SKIP
201
+ total_vat_amount_billing_currency =
202
+ hash.key?('TotalVATAmountBillingCurrency') ? hash['TotalVATAmountBillingCurrency'] : SKIP
203
+
204
+ # Create object from extracted values.
205
+ InvoicesSummaries.new(amount_due,
206
+ amount_not_overdue,
207
+ amount_overdue,
208
+ amount_paid,
209
+ billing_currency_code,
210
+ billing_currency_symbol,
211
+ outstanding_balance,
212
+ payment_due_date,
213
+ summary_document_date,
214
+ total_billing_documents,
215
+ total_gross_amount_billing_currency,
216
+ total_net_amount_billing_currency,
217
+ total_summary_documents,
218
+ total_vat_amount_billing_currency)
219
+ end
220
+ end
221
+ end