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,360 @@
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
+ # MultiPricedTransactionRequest Model.
8
+ class MultiPricedTransactionRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Collecting Company Id of the selected payer.
13
+ # Optional if ColCoCode is passed else Mandatory.
14
+ # Example:
15
+ # 1 for Philippines
16
+ # 5 for UK
17
+ # @return [Integer]
18
+ attr_accessor :col_co_id
19
+
20
+ # Collecting Company Code of the selected payer.
21
+ # Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia,
22
+ # Ukraine etc. It is optional for other countries if ColCoID is provided.
23
+ # Example:
24
+ # 86 for Philippines
25
+ # 5 for UK
26
+ # @return [Integer]
27
+ attr_accessor :col_co_code
28
+
29
+ # List of Payers/Accounts entity.
30
+ # Mandatory.
31
+ # • Max number of payers allowed in the input is 10, if it exceeds in the
32
+ # input it will throw an error.
33
+ # • This value is configurable. Initial configuration will be 100 and will
34
+ # change to 10 once SFH changes are integrated.
35
+ # Note:
36
+ # 1. At least one payer should be present.
37
+ # Accounts information are optional.
38
+ # @return [Array[MultiPricedTransactionRequestAccountsItems]]
39
+ attr_accessor :accounts
40
+
41
+ # Invoice status of the transactions
42
+ # Mandatory
43
+ # Possible options:
44
+ # I - Invoiced
45
+ # U – Un-Invoiced
46
+ # A – All
47
+ # Max Length: 1
48
+ # @return [String]
49
+ attr_accessor :invoice_status
50
+
51
+ # ISO Country Code (ex: UK, FR)
52
+ # Optional
53
+ # Note: If IncludeFees is true then this filter will be ignored
54
+ # @return [String]
55
+ attr_accessor :purchased_in_country
56
+
57
+ # Transactions from Date/Time.
58
+ # Optional – When provided, it should be with in last 24 months.
59
+ # Format: yyyyMMdd
60
+ # @return [String]
61
+ attr_accessor :from_date
62
+
63
+ # Transactions to Date/Time.
64
+ # 1) When the value is blank and FromDate is provided on the input, all
65
+ # transactions took place 210(Configurable) days after the given FromDate is
66
+ # returned.
67
+ # 2) Difference between FromDate and ToDate cannot be more than 210
68
+ # (Configurable) days.
69
+ # Format: yyyyMMdd
70
+ # @return [String]
71
+ attr_accessor :to_date
72
+
73
+ # Transactions Period.
74
+ # Possible values are:
75
+ # 1. Last 7 Days
76
+ # 2. Last 30 Days
77
+ # 3. Last 90 Days
78
+ # @return [Integer]
79
+ attr_accessor :period
80
+
81
+ # Transaction Posting Date/time in the Cards Platform - From Date/time.
82
+ # Note:
83
+ # 1) When the value of both PostingDateFrom and PostingDateTo are present in
84
+ # the request then the value of PostingDateFrom must be less than
85
+ # PostingDateTo.
86
+ # 2) If IncludeFees is true then this filter will be ignored
87
+ # Format: yyyyMMdd HH:mm:ss
88
+ # @return [String]
89
+ attr_accessor :posting_date_from
90
+
91
+ # Transaction Posting Date/time in the Cards Platform – To Date/time.
92
+ # Note:
93
+ # 1) If IncludeFees is true then this filter will be ignored.
94
+ # 2) When the value of both PostingDateFrom and PostingDateTo are present in
95
+ # the request then the value of PostingDateFrom must be less than
96
+ # PostingDateTo.
97
+ # Format: yyyyMMdd HH:mm:ss
98
+ # @return [String]
99
+ attr_accessor :posting_date_to
100
+
101
+ # Invoice Date.
102
+ # Optional
103
+ # Note:
104
+ # 1) If value is not blank then the system will ignore the InvoiceStatus
105
+ # parameter and it will return all the billed transactions for the given
106
+ # invoice date.
107
+ # 2) If IncludeFees is true then this filter will be ignored
108
+ #
109
+ # Format: yyyyMMdd
110
+ # @return [String]
111
+ attr_accessor :invoice_date
112
+
113
+ # Invoice Number.
114
+ # Optional
115
+ # Note:
116
+ # 1) If value is not blank then the system will ignore the InvoiceStatus
117
+ # parameter and it will return all the billed transactions for the given
118
+ # invoice date.
119
+ # @return [String]
120
+ attr_accessor :invoice_number
121
+
122
+ # True/False
123
+ # Optional
124
+ # Default value: True.
125
+ # When passed as ‘True’ the transactions records with report date not equal
126
+ # to 9999-12-30 will be returned.
127
+ # When passed as ‘False’ the above condition will not be checked.
128
+ # Note: If IncludeFees is ‘True’ then this filter will be ignored
129
+ # @return [TrueClass | FalseClass]
130
+ attr_accessor :valid_invoice_date_only
131
+
132
+ # Start date for transaction search by invoice date.
133
+ # Optional
134
+ # Note:
135
+ # 1) Value should be with in last 24 months (if provided).
136
+ # 2) Maximum of 90(Configurable) days duration allowed per search.
137
+ # 3) When provided, InvoiceFromDate has to be less than or equal to
138
+ # InvoiceToDate.
139
+ # Format: yyyyMMdd
140
+ # @return [String]
141
+ attr_accessor :invoice_from_date
142
+
143
+ # End date for transaction search by invoice date.
144
+ # Optional
145
+ # Note:
146
+ # 1) When InvoiceFromDate is provided and InvoiceToDate is null, then
147
+ # InvoiceToDate will be calculated as (InvoiceFromDate + 90 days) or
148
+ # (CurrentDate) whichever is lesser.
149
+ # Format: yyyyMMdd
150
+ # @return [String]
151
+ attr_accessor :invoice_to_date
152
+
153
+ # True/False
154
+ # Optional
155
+ # Default value: False.
156
+ # When passed as ‘True’ Only returned records with Fuel transactions.
157
+ # When passed as ‘False’ the above condition will not be checked.
158
+ # Note: If IncludeFees is ‘True’ then this filter will be ignored
159
+ # @return [TrueClass | FalseClass]
160
+ attr_accessor :fuel_only
161
+
162
+ # True/False
163
+ # Optional
164
+ # Default value: False
165
+ # When passed as ‘True’ then ignore complex filters, all sales items along
166
+ # with fees included on the same response
167
+ # @return [TrueClass | FalseClass]
168
+ attr_accessor :include_fees
169
+
170
+ # Allowed Sorting Options:
171
+ # 1. TransactionDateAscending
172
+ # 2. TransactionDateDescending
173
+ # 3. GrossAmountDescending
174
+ # 4. GrossAmountAscending
175
+ # 5. NetAmountAscending
176
+ # 6. NetAmountDescensding
177
+ # Example value to be passed: 1,3
178
+ # Note: If IncludeFees is ‘True’ then sorting is not allowed. This parameter
179
+ # will be ignored.
180
+ # @return [String]
181
+ attr_accessor :sort_order
182
+
183
+ # Page Number (as shown to the users)
184
+ # Optional
185
+ # Default value 1
186
+ # Note: If IncludeFees is ‘True’ then pagination is not allowed. This
187
+ # parameter will be ignored.
188
+ # @return [Integer]
189
+ attr_accessor :current_page
190
+
191
+ # Page Size – Number of records to show on a page
192
+ # Optional
193
+ # Default value 50
194
+ # Note: If IncludeFees is ‘True’ then pagination is not allowed. This
195
+ # parameter will be ignored.
196
+ # @return [Integer]
197
+ attr_accessor :page_size
198
+
199
+ # A mapping from model property names to API property names.
200
+ def self.names
201
+ @_hash = {} if @_hash.nil?
202
+ @_hash['col_co_id'] = 'ColCoId'
203
+ @_hash['col_co_code'] = 'ColCoCode'
204
+ @_hash['accounts'] = 'Accounts'
205
+ @_hash['invoice_status'] = 'InvoiceStatus'
206
+ @_hash['purchased_in_country'] = 'PurchasedInCountry'
207
+ @_hash['from_date'] = 'FromDate'
208
+ @_hash['to_date'] = 'ToDate'
209
+ @_hash['period'] = 'Period'
210
+ @_hash['posting_date_from'] = 'PostingDateFrom'
211
+ @_hash['posting_date_to'] = 'PostingDateTo'
212
+ @_hash['invoice_date'] = 'InvoiceDate'
213
+ @_hash['invoice_number'] = 'InvoiceNumber'
214
+ @_hash['valid_invoice_date_only'] = 'ValidInvoiceDateOnly'
215
+ @_hash['invoice_from_date'] = 'InvoiceFromDate'
216
+ @_hash['invoice_to_date'] = 'InvoiceToDate'
217
+ @_hash['fuel_only'] = 'FuelOnly'
218
+ @_hash['include_fees'] = 'IncludeFees'
219
+ @_hash['sort_order'] = 'SortOrder'
220
+ @_hash['current_page'] = 'CurrentPage'
221
+ @_hash['page_size'] = 'PageSize'
222
+ @_hash
223
+ end
224
+
225
+ # An array for optional fields
226
+ def self.optionals
227
+ %w[
228
+ col_co_id
229
+ invoice_status
230
+ purchased_in_country
231
+ from_date
232
+ to_date
233
+ period
234
+ posting_date_from
235
+ posting_date_to
236
+ invoice_date
237
+ invoice_number
238
+ valid_invoice_date_only
239
+ invoice_from_date
240
+ invoice_to_date
241
+ fuel_only
242
+ include_fees
243
+ sort_order
244
+ current_page
245
+ page_size
246
+ ]
247
+ end
248
+
249
+ # An array for nullable fields
250
+ def self.nullables
251
+ []
252
+ end
253
+
254
+ def initialize(col_co_code = nil,
255
+ accounts = nil,
256
+ col_co_id = SKIP,
257
+ invoice_status = SKIP,
258
+ purchased_in_country = SKIP,
259
+ from_date = SKIP,
260
+ to_date = SKIP,
261
+ period = SKIP,
262
+ posting_date_from = SKIP,
263
+ posting_date_to = SKIP,
264
+ invoice_date = SKIP,
265
+ invoice_number = SKIP,
266
+ valid_invoice_date_only = SKIP,
267
+ invoice_from_date = SKIP,
268
+ invoice_to_date = SKIP,
269
+ fuel_only = SKIP,
270
+ include_fees = SKIP,
271
+ sort_order = SKIP,
272
+ current_page = SKIP,
273
+ page_size = SKIP)
274
+ @col_co_id = col_co_id unless col_co_id == SKIP
275
+ @col_co_code = col_co_code
276
+ @accounts = accounts
277
+ @invoice_status = invoice_status unless invoice_status == SKIP
278
+ @purchased_in_country = purchased_in_country unless purchased_in_country == SKIP
279
+ @from_date = from_date unless from_date == SKIP
280
+ @to_date = to_date unless to_date == SKIP
281
+ @period = period unless period == SKIP
282
+ @posting_date_from = posting_date_from unless posting_date_from == SKIP
283
+ @posting_date_to = posting_date_to unless posting_date_to == SKIP
284
+ @invoice_date = invoice_date unless invoice_date == SKIP
285
+ @invoice_number = invoice_number unless invoice_number == SKIP
286
+ @valid_invoice_date_only = valid_invoice_date_only unless valid_invoice_date_only == SKIP
287
+ @invoice_from_date = invoice_from_date unless invoice_from_date == SKIP
288
+ @invoice_to_date = invoice_to_date unless invoice_to_date == SKIP
289
+ @fuel_only = fuel_only unless fuel_only == SKIP
290
+ @include_fees = include_fees unless include_fees == SKIP
291
+ @sort_order = sort_order unless sort_order == SKIP
292
+ @current_page = current_page unless current_page == SKIP
293
+ @page_size = page_size unless page_size == SKIP
294
+ end
295
+
296
+ # Creates an instance of the object from a hash.
297
+ def self.from_hash(hash)
298
+ return nil unless hash
299
+
300
+ # Extract variables from the hash.
301
+ col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : nil
302
+ # Parameter is an array, so we need to iterate through it
303
+ accounts = nil
304
+ unless hash['Accounts'].nil?
305
+ accounts = []
306
+ hash['Accounts'].each do |structure|
307
+ accounts << (MultiPricedTransactionRequestAccountsItems.from_hash(structure) if structure)
308
+ end
309
+ end
310
+
311
+ accounts = nil unless hash.key?('Accounts')
312
+ col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
313
+ invoice_status = hash.key?('InvoiceStatus') ? hash['InvoiceStatus'] : SKIP
314
+ purchased_in_country =
315
+ hash.key?('PurchasedInCountry') ? hash['PurchasedInCountry'] : SKIP
316
+ from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
317
+ to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP
318
+ period = hash.key?('Period') ? hash['Period'] : SKIP
319
+ posting_date_from =
320
+ hash.key?('PostingDateFrom') ? hash['PostingDateFrom'] : SKIP
321
+ posting_date_to =
322
+ hash.key?('PostingDateTo') ? hash['PostingDateTo'] : SKIP
323
+ invoice_date = hash.key?('InvoiceDate') ? hash['InvoiceDate'] : SKIP
324
+ invoice_number = hash.key?('InvoiceNumber') ? hash['InvoiceNumber'] : SKIP
325
+ valid_invoice_date_only =
326
+ hash.key?('ValidInvoiceDateOnly') ? hash['ValidInvoiceDateOnly'] : SKIP
327
+ invoice_from_date =
328
+ hash.key?('InvoiceFromDate') ? hash['InvoiceFromDate'] : SKIP
329
+ invoice_to_date =
330
+ hash.key?('InvoiceToDate') ? hash['InvoiceToDate'] : SKIP
331
+ fuel_only = hash.key?('FuelOnly') ? hash['FuelOnly'] : SKIP
332
+ include_fees = hash.key?('IncludeFees') ? hash['IncludeFees'] : SKIP
333
+ sort_order = hash.key?('SortOrder') ? hash['SortOrder'] : SKIP
334
+ current_page = hash.key?('CurrentPage') ? hash['CurrentPage'] : SKIP
335
+ page_size = hash.key?('PageSize') ? hash['PageSize'] : SKIP
336
+
337
+ # Create object from extracted values.
338
+ MultiPricedTransactionRequest.new(col_co_code,
339
+ accounts,
340
+ col_co_id,
341
+ invoice_status,
342
+ purchased_in_country,
343
+ from_date,
344
+ to_date,
345
+ period,
346
+ posting_date_from,
347
+ posting_date_to,
348
+ invoice_date,
349
+ invoice_number,
350
+ valid_invoice_date_only,
351
+ invoice_from_date,
352
+ invoice_to_date,
353
+ fuel_only,
354
+ include_fees,
355
+ sort_order,
356
+ current_page,
357
+ page_size)
358
+ end
359
+ end
360
+ end
@@ -0,0 +1,84 @@
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
+ # MultiPricedTransactionRequestAccountsItems Model.
8
+ class MultiPricedTransactionRequestAccountsItems < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Payer Id of the selected payer.
13
+ # Optional if PayerNumber is passed else Mandatory
14
+ # Example: 123456
15
+ # @return [Integer]
16
+ attr_accessor :payer_id
17
+
18
+ # Payer Number (Ex: GB000000123) of the selected payer.
19
+ # Optional if PayerId is passed else Mandatory
20
+ # Example: GB000000123
21
+ # @return [String]
22
+ attr_accessor :payer_number
23
+
24
+ # Account Id of the selected account.
25
+ # @return [Integer]
26
+ attr_accessor :account_id
27
+
28
+ # Account Number (ex: GB000000123) of the selected account.
29
+ # @return [String]
30
+ attr_accessor :account_number
31
+
32
+ # A mapping from model property names to API property names.
33
+ def self.names
34
+ @_hash = {} if @_hash.nil?
35
+ @_hash['payer_id'] = 'PayerId'
36
+ @_hash['payer_number'] = 'PayerNumber'
37
+ @_hash['account_id'] = 'AccountId'
38
+ @_hash['account_number'] = 'AccountNumber'
39
+ @_hash
40
+ end
41
+
42
+ # An array for optional fields
43
+ def self.optionals
44
+ %w[
45
+ payer_id
46
+ payer_number
47
+ account_id
48
+ account_number
49
+ ]
50
+ end
51
+
52
+ # An array for nullable fields
53
+ def self.nullables
54
+ []
55
+ end
56
+
57
+ def initialize(payer_id = SKIP,
58
+ payer_number = SKIP,
59
+ account_id = SKIP,
60
+ account_number = SKIP)
61
+ @payer_id = payer_id unless payer_id == SKIP
62
+ @payer_number = payer_number unless payer_number == SKIP
63
+ @account_id = account_id unless account_id == SKIP
64
+ @account_number = account_number unless account_number == SKIP
65
+ end
66
+
67
+ # Creates an instance of the object from a hash.
68
+ def self.from_hash(hash)
69
+ return nil unless hash
70
+
71
+ # Extract variables from the hash.
72
+ payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
73
+ payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
74
+ account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP
75
+ account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
76
+
77
+ # Create object from extracted values.
78
+ MultiPricedTransactionRequestAccountsItems.new(payer_id,
79
+ payer_number,
80
+ account_id,
81
+ account_number)
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,110 @@
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
+ # MultiPricedTransactionResponse Model.
8
+ class MultiPricedTransactionResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Array[MultiPricedTransactionResponseTransactionsItems]]
14
+ attr_accessor :transactions
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [ErrorStatus]
18
+ attr_accessor :error
19
+
20
+ # API Request Id
21
+ # @return [String]
22
+ attr_accessor :request_id
23
+
24
+ # Current Page
25
+ # @return [Integer]
26
+ attr_accessor :current_page
27
+
28
+ # Total row count matched for the given input criteria
29
+ # @return [Integer]
30
+ attr_accessor :row_count
31
+
32
+ # Calculated page count based on page size from the incoming API request and
33
+ # total number of rows matched for the given input criteria
34
+ # @return [Integer]
35
+ attr_accessor :total_pages
36
+
37
+ # A mapping from model property names to API property names.
38
+ def self.names
39
+ @_hash = {} if @_hash.nil?
40
+ @_hash['transactions'] = 'Transactions'
41
+ @_hash['error'] = 'Error'
42
+ @_hash['request_id'] = 'RequestId'
43
+ @_hash['current_page'] = 'CurrentPage'
44
+ @_hash['row_count'] = 'RowCount'
45
+ @_hash['total_pages'] = 'TotalPages'
46
+ @_hash
47
+ end
48
+
49
+ # An array for optional fields
50
+ def self.optionals
51
+ %w[
52
+ transactions
53
+ error
54
+ request_id
55
+ current_page
56
+ row_count
57
+ total_pages
58
+ ]
59
+ end
60
+
61
+ # An array for nullable fields
62
+ def self.nullables
63
+ []
64
+ end
65
+
66
+ def initialize(transactions = SKIP,
67
+ error = SKIP,
68
+ request_id = SKIP,
69
+ current_page = SKIP,
70
+ row_count = SKIP,
71
+ total_pages = SKIP)
72
+ @transactions = transactions unless transactions == SKIP
73
+ @error = error unless error == SKIP
74
+ @request_id = request_id unless request_id == SKIP
75
+ @current_page = current_page unless current_page == SKIP
76
+ @row_count = row_count unless row_count == SKIP
77
+ @total_pages = total_pages unless total_pages == SKIP
78
+ end
79
+
80
+ # Creates an instance of the object from a hash.
81
+ def self.from_hash(hash)
82
+ return nil unless hash
83
+
84
+ # Extract variables from the hash.
85
+ # Parameter is an array, so we need to iterate through it
86
+ transactions = nil
87
+ unless hash['Transactions'].nil?
88
+ transactions = []
89
+ hash['Transactions'].each do |structure|
90
+ transactions << (MultiPricedTransactionResponseTransactionsItems.from_hash(structure) if structure)
91
+ end
92
+ end
93
+
94
+ transactions = SKIP unless hash.key?('Transactions')
95
+ error = ErrorStatus.from_hash(hash['Error']) if hash['Error']
96
+ request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
97
+ current_page = hash.key?('CurrentPage') ? hash['CurrentPage'] : SKIP
98
+ row_count = hash.key?('RowCount') ? hash['RowCount'] : SKIP
99
+ total_pages = hash.key?('TotalPages') ? hash['TotalPages'] : SKIP
100
+
101
+ # Create object from extracted values.
102
+ MultiPricedTransactionResponse.new(transactions,
103
+ error,
104
+ request_id,
105
+ current_page,
106
+ row_count,
107
+ total_pages)
108
+ end
109
+ end
110
+ end