data-and-reporting-sdk 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
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,194 @@
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
+ # FeeItemSummaryAllOf0 Model.
8
+ class FeeItemSummaryAllOf0 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Fee type group in under which the Fee item is generated.
13
+ # @return [String]
14
+ attr_accessor :fee_type_group
15
+
16
+ # Fee Type Id ID Description
17
+ # @return [String]
18
+ attr_accessor :fee_type_id
19
+
20
+ # Product Id
21
+ # @return [Integer]
22
+ attr_accessor :product_id
23
+
24
+ # Product Code
25
+ # @return [String]
26
+ attr_accessor :product_code
27
+
28
+ # Product Name
29
+ # @return [String]
30
+ attr_accessor :product_name
31
+
32
+ # Product Group Id
33
+ # @return [Integer]
34
+ attr_accessor :product_group_id
35
+
36
+ # Product Group Name
37
+ # @return [String]
38
+ attr_accessor :product_group_name
39
+
40
+ # Total Quantity
41
+ # @return [Float]
42
+ attr_accessor :total_quantity
43
+
44
+ # Total Net amount in invoice currency
45
+ # @return [Float]
46
+ attr_accessor :total_invoice_net_amount
47
+
48
+ # Total Gross amount in invoice currency
49
+ # @return [Float]
50
+ attr_accessor :total_invoice_gross_amount
51
+
52
+ # Total VAT amount in invoice currency
53
+ # @return [Float]
54
+ attr_accessor :total_invoice_vat_amount
55
+
56
+ # ISO 4217 currency code of the country
57
+ # @return [String]
58
+ attr_accessor :invoice_currency_code
59
+
60
+ # Currency symbol of the Invoice Currency Code
61
+ # @return [String]
62
+ attr_accessor :invoice_currency_symbol
63
+
64
+ # A mapping from model property names to API property names.
65
+ def self.names
66
+ @_hash = {} if @_hash.nil?
67
+ @_hash['fee_type_group'] = 'FeeTypeGroup'
68
+ @_hash['fee_type_id'] = 'FeeTypeId'
69
+ @_hash['product_id'] = 'ProductId'
70
+ @_hash['product_code'] = 'ProductCode'
71
+ @_hash['product_name'] = 'ProductName'
72
+ @_hash['product_group_id'] = 'ProductGroupId'
73
+ @_hash['product_group_name'] = 'ProductGroupName'
74
+ @_hash['total_quantity'] = 'TotalQuantity'
75
+ @_hash['total_invoice_net_amount'] = 'TotalInvoiceNetAmount'
76
+ @_hash['total_invoice_gross_amount'] = 'TotalInvoiceGrossAmount'
77
+ @_hash['total_invoice_vat_amount'] = 'TotalInvoiceVATAmount'
78
+ @_hash['invoice_currency_code'] = 'InvoiceCurrencyCode'
79
+ @_hash['invoice_currency_symbol'] = 'InvoiceCurrencySymbol'
80
+ @_hash
81
+ end
82
+
83
+ # An array for optional fields
84
+ def self.optionals
85
+ %w[
86
+ fee_type_group
87
+ fee_type_id
88
+ product_id
89
+ product_code
90
+ product_name
91
+ product_group_id
92
+ product_group_name
93
+ total_quantity
94
+ total_invoice_net_amount
95
+ total_invoice_gross_amount
96
+ total_invoice_vat_amount
97
+ invoice_currency_code
98
+ invoice_currency_symbol
99
+ ]
100
+ end
101
+
102
+ # An array for nullable fields
103
+ def self.nullables
104
+ %w[
105
+ fee_type_group
106
+ fee_type_id
107
+ product_id
108
+ product_code
109
+ product_name
110
+ product_group_id
111
+ product_group_name
112
+ total_quantity
113
+ total_invoice_net_amount
114
+ total_invoice_gross_amount
115
+ total_invoice_vat_amount
116
+ invoice_currency_code
117
+ invoice_currency_symbol
118
+ ]
119
+ end
120
+
121
+ def initialize(fee_type_group = SKIP,
122
+ fee_type_id = SKIP,
123
+ product_id = SKIP,
124
+ product_code = SKIP,
125
+ product_name = SKIP,
126
+ product_group_id = SKIP,
127
+ product_group_name = SKIP,
128
+ total_quantity = SKIP,
129
+ total_invoice_net_amount = SKIP,
130
+ total_invoice_gross_amount = SKIP,
131
+ total_invoice_vat_amount = SKIP,
132
+ invoice_currency_code = SKIP,
133
+ invoice_currency_symbol = SKIP)
134
+ @fee_type_group = fee_type_group unless fee_type_group == SKIP
135
+ @fee_type_id = fee_type_id unless fee_type_id == SKIP
136
+ @product_id = product_id unless product_id == SKIP
137
+ @product_code = product_code unless product_code == SKIP
138
+ @product_name = product_name unless product_name == SKIP
139
+ @product_group_id = product_group_id unless product_group_id == SKIP
140
+ @product_group_name = product_group_name unless product_group_name == SKIP
141
+ @total_quantity = total_quantity unless total_quantity == SKIP
142
+ @total_invoice_net_amount = total_invoice_net_amount unless total_invoice_net_amount == SKIP
143
+ unless total_invoice_gross_amount == SKIP
144
+ @total_invoice_gross_amount =
145
+ total_invoice_gross_amount
146
+ end
147
+ @total_invoice_vat_amount = total_invoice_vat_amount unless total_invoice_vat_amount == SKIP
148
+ @invoice_currency_code = invoice_currency_code unless invoice_currency_code == SKIP
149
+ @invoice_currency_symbol = invoice_currency_symbol unless invoice_currency_symbol == SKIP
150
+ end
151
+
152
+ # Creates an instance of the object from a hash.
153
+ def self.from_hash(hash)
154
+ return nil unless hash
155
+
156
+ # Extract variables from the hash.
157
+ fee_type_group = hash.key?('FeeTypeGroup') ? hash['FeeTypeGroup'] : SKIP
158
+ fee_type_id = hash.key?('FeeTypeId') ? hash['FeeTypeId'] : SKIP
159
+ product_id = hash.key?('ProductId') ? hash['ProductId'] : SKIP
160
+ product_code = hash.key?('ProductCode') ? hash['ProductCode'] : SKIP
161
+ product_name = hash.key?('ProductName') ? hash['ProductName'] : SKIP
162
+ product_group_id =
163
+ hash.key?('ProductGroupId') ? hash['ProductGroupId'] : SKIP
164
+ product_group_name =
165
+ hash.key?('ProductGroupName') ? hash['ProductGroupName'] : SKIP
166
+ total_quantity = hash.key?('TotalQuantity') ? hash['TotalQuantity'] : SKIP
167
+ total_invoice_net_amount =
168
+ hash.key?('TotalInvoiceNetAmount') ? hash['TotalInvoiceNetAmount'] : SKIP
169
+ total_invoice_gross_amount =
170
+ hash.key?('TotalInvoiceGrossAmount') ? hash['TotalInvoiceGrossAmount'] : SKIP
171
+ total_invoice_vat_amount =
172
+ hash.key?('TotalInvoiceVATAmount') ? hash['TotalInvoiceVATAmount'] : SKIP
173
+ invoice_currency_code =
174
+ hash.key?('InvoiceCurrencyCode') ? hash['InvoiceCurrencyCode'] : SKIP
175
+ invoice_currency_symbol =
176
+ hash.key?('InvoiceCurrencySymbol') ? hash['InvoiceCurrencySymbol'] : SKIP
177
+
178
+ # Create object from extracted values.
179
+ FeeItemSummaryAllOf0.new(fee_type_group,
180
+ fee_type_id,
181
+ product_id,
182
+ product_code,
183
+ product_name,
184
+ product_group_id,
185
+ product_group_name,
186
+ total_quantity,
187
+ total_invoice_net_amount,
188
+ total_invoice_gross_amount,
189
+ total_invoice_vat_amount,
190
+ invoice_currency_code,
191
+ invoice_currency_symbol)
192
+ end
193
+ end
194
+ end
@@ -0,0 +1,153 @@
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
+ # FeeRuleLocation Model.
8
+ class FeeRuleLocation < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Delco Identifier.
13
+ # @return [String]
14
+ attr_accessor :delco_id
15
+
16
+ # Country name.
17
+ # @return [String]
18
+ attr_accessor :country
19
+
20
+ # ISO Code of country.
21
+ # @return [String]
22
+ attr_accessor :country_code
23
+
24
+ # Fuel Network Identifier.
25
+ # @return [Integer]
26
+ attr_accessor :fuel_network_id
27
+
28
+ # Network Name.
29
+ # @return [String]
30
+ attr_accessor :network_name
31
+
32
+ # Site-Group ID
33
+ # @return [Integer]
34
+ attr_accessor :site_group_id
35
+
36
+ # Site-Group name.
37
+ # @return [String]
38
+ attr_accessor :site_group_name
39
+
40
+ # Site Code
41
+ # @return [Integer]
42
+ attr_accessor :site_code
43
+
44
+ # Site Identifier
45
+ # @return [Integer]
46
+ attr_accessor :site_id
47
+
48
+ # Site Name
49
+ # @return [String]
50
+ attr_accessor :site_name
51
+
52
+ # A mapping from model property names to API property names.
53
+ def self.names
54
+ @_hash = {} if @_hash.nil?
55
+ @_hash['delco_id'] = 'DelcoId'
56
+ @_hash['country'] = 'Country'
57
+ @_hash['country_code'] = 'CountryCode'
58
+ @_hash['fuel_network_id'] = 'FuelNetworkId'
59
+ @_hash['network_name'] = 'NetworkName'
60
+ @_hash['site_group_id'] = 'SiteGroupId'
61
+ @_hash['site_group_name'] = 'SiteGroupName'
62
+ @_hash['site_code'] = 'SiteCode'
63
+ @_hash['site_id'] = 'SiteId'
64
+ @_hash['site_name'] = 'SiteName'
65
+ @_hash
66
+ end
67
+
68
+ # An array for optional fields
69
+ def self.optionals
70
+ %w[
71
+ delco_id
72
+ country
73
+ country_code
74
+ fuel_network_id
75
+ network_name
76
+ site_group_id
77
+ site_group_name
78
+ site_code
79
+ site_id
80
+ site_name
81
+ ]
82
+ end
83
+
84
+ # An array for nullable fields
85
+ def self.nullables
86
+ %w[
87
+ delco_id
88
+ country
89
+ country_code
90
+ fuel_network_id
91
+ network_name
92
+ site_group_id
93
+ site_group_name
94
+ site_code
95
+ site_id
96
+ site_name
97
+ ]
98
+ end
99
+
100
+ def initialize(delco_id = SKIP,
101
+ country = SKIP,
102
+ country_code = SKIP,
103
+ fuel_network_id = SKIP,
104
+ network_name = SKIP,
105
+ site_group_id = SKIP,
106
+ site_group_name = SKIP,
107
+ site_code = SKIP,
108
+ site_id = SKIP,
109
+ site_name = SKIP)
110
+ @delco_id = delco_id unless delco_id == SKIP
111
+ @country = country unless country == SKIP
112
+ @country_code = country_code unless country_code == SKIP
113
+ @fuel_network_id = fuel_network_id unless fuel_network_id == SKIP
114
+ @network_name = network_name unless network_name == SKIP
115
+ @site_group_id = site_group_id unless site_group_id == SKIP
116
+ @site_group_name = site_group_name unless site_group_name == SKIP
117
+ @site_code = site_code unless site_code == SKIP
118
+ @site_id = site_id unless site_id == SKIP
119
+ @site_name = site_name unless site_name == SKIP
120
+ end
121
+
122
+ # Creates an instance of the object from a hash.
123
+ def self.from_hash(hash)
124
+ return nil unless hash
125
+
126
+ # Extract variables from the hash.
127
+ delco_id = hash.key?('DelcoId') ? hash['DelcoId'] : SKIP
128
+ country = hash.key?('Country') ? hash['Country'] : SKIP
129
+ country_code = hash.key?('CountryCode') ? hash['CountryCode'] : SKIP
130
+ fuel_network_id =
131
+ hash.key?('FuelNetworkId') ? hash['FuelNetworkId'] : SKIP
132
+ network_name = hash.key?('NetworkName') ? hash['NetworkName'] : SKIP
133
+ site_group_id = hash.key?('SiteGroupId') ? hash['SiteGroupId'] : SKIP
134
+ site_group_name =
135
+ hash.key?('SiteGroupName') ? hash['SiteGroupName'] : SKIP
136
+ site_code = hash.key?('SiteCode') ? hash['SiteCode'] : SKIP
137
+ site_id = hash.key?('SiteId') ? hash['SiteId'] : SKIP
138
+ site_name = hash.key?('SiteName') ? hash['SiteName'] : SKIP
139
+
140
+ # Create object from extracted values.
141
+ FeeRuleLocation.new(delco_id,
142
+ country,
143
+ country_code,
144
+ fuel_network_id,
145
+ network_name,
146
+ site_group_id,
147
+ site_group_name,
148
+ site_code,
149
+ site_id,
150
+ site_name)
151
+ end
152
+ end
153
+ end
@@ -0,0 +1,98 @@
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
+ # FeeRuleProduct Model.
8
+ class FeeRuleProduct < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Product Group Id
13
+ # @return [Integer]
14
+ attr_accessor :product_group_id
15
+
16
+ # Product Group name
17
+ # @return [String]
18
+ attr_accessor :product_group_name
19
+
20
+ # Client Product Code
21
+ # @return [String]
22
+ attr_accessor :product_code
23
+
24
+ # Product Id
25
+ # @return [Integer]
26
+ attr_accessor :product_id
27
+
28
+ # Product name in English
29
+ # @return [String]
30
+ attr_accessor :product_name
31
+
32
+ # A mapping from model property names to API property names.
33
+ def self.names
34
+ @_hash = {} if @_hash.nil?
35
+ @_hash['product_group_id'] = 'ProductGroupId'
36
+ @_hash['product_group_name'] = 'ProductGroupName'
37
+ @_hash['product_code'] = 'ProductCode'
38
+ @_hash['product_id'] = 'ProductId'
39
+ @_hash['product_name'] = 'ProductName'
40
+ @_hash
41
+ end
42
+
43
+ # An array for optional fields
44
+ def self.optionals
45
+ %w[
46
+ product_group_id
47
+ product_group_name
48
+ product_code
49
+ product_id
50
+ product_name
51
+ ]
52
+ end
53
+
54
+ # An array for nullable fields
55
+ def self.nullables
56
+ %w[
57
+ product_group_id
58
+ product_group_name
59
+ product_code
60
+ product_id
61
+ product_name
62
+ ]
63
+ end
64
+
65
+ def initialize(product_group_id = SKIP,
66
+ product_group_name = SKIP,
67
+ product_code = SKIP,
68
+ product_id = SKIP,
69
+ product_name = SKIP)
70
+ @product_group_id = product_group_id unless product_group_id == SKIP
71
+ @product_group_name = product_group_name unless product_group_name == SKIP
72
+ @product_code = product_code unless product_code == SKIP
73
+ @product_id = product_id unless product_id == SKIP
74
+ @product_name = product_name unless product_name == SKIP
75
+ end
76
+
77
+ # Creates an instance of the object from a hash.
78
+ def self.from_hash(hash)
79
+ return nil unless hash
80
+
81
+ # Extract variables from the hash.
82
+ product_group_id =
83
+ hash.key?('ProductGroupId') ? hash['ProductGroupId'] : SKIP
84
+ product_group_name =
85
+ hash.key?('ProductGroupName') ? hash['ProductGroupName'] : SKIP
86
+ product_code = hash.key?('ProductCode') ? hash['ProductCode'] : SKIP
87
+ product_id = hash.key?('ProductId') ? hash['ProductId'] : SKIP
88
+ product_name = hash.key?('ProductName') ? hash['ProductName'] : SKIP
89
+
90
+ # Create object from extracted values.
91
+ FeeRuleProduct.new(product_group_id,
92
+ product_group_name,
93
+ product_code,
94
+ product_id,
95
+ product_name)
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,74 @@
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
+ # FeeRuleTier Model.
8
+ class FeeRuleTier < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Minimum consumption configured in the tier.
13
+ # @return [Integer]
14
+ attr_accessor :tier_minimum
15
+
16
+ # Bonus value for the tier.
17
+ # @return [Float]
18
+ attr_accessor :value
19
+
20
+ # Maximum consumption configured in the tier.
21
+ # @return [Integer]
22
+ attr_accessor :tier_maximum
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['tier_minimum'] = 'TierMinimum'
28
+ @_hash['value'] = 'Value'
29
+ @_hash['tier_maximum'] = 'TierMaximum'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ %w[
36
+ tier_minimum
37
+ value
38
+ tier_maximum
39
+ ]
40
+ end
41
+
42
+ # An array for nullable fields
43
+ def self.nullables
44
+ %w[
45
+ tier_minimum
46
+ value
47
+ tier_maximum
48
+ ]
49
+ end
50
+
51
+ def initialize(tier_minimum = SKIP,
52
+ value = SKIP,
53
+ tier_maximum = SKIP)
54
+ @tier_minimum = tier_minimum unless tier_minimum == SKIP
55
+ @value = value unless value == SKIP
56
+ @tier_maximum = tier_maximum unless tier_maximum == SKIP
57
+ end
58
+
59
+ # Creates an instance of the object from a hash.
60
+ def self.from_hash(hash)
61
+ return nil unless hash
62
+
63
+ # Extract variables from the hash.
64
+ tier_minimum = hash.key?('TierMinimum') ? hash['TierMinimum'] : SKIP
65
+ value = hash.key?('Value') ? hash['Value'] : SKIP
66
+ tier_maximum = hash.key?('TierMaximum') ? hash['TierMaximum'] : SKIP
67
+
68
+ # Create object from extracted values.
69
+ FeeRuleTier.new(tier_minimum,
70
+ value,
71
+ tier_maximum)
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,85 @@
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
+ # FeeSummaryResponse Model.
8
+ class FeeSummaryResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Array[FeeItemSummaryAllOf0]]
14
+ attr_accessor :fee_items_summary
15
+
16
+ # A unique request id in GUID format. The value is written to the Shell API
17
+ # Platform audit log for end to end traceability of a request. If a value is
18
+ # not provided by an API client, then a GUID is automatically populated by
19
+ # the Shell API Platform and returned in the API response.
20
+ # @return [String]
21
+ attr_accessor :request_id
22
+
23
+ # A unique request id in GUID format. The value is written to the Shell API
24
+ # Platform audit log for end to end traceability of a request. If a value is
25
+ # not provided by an API client, then a GUID is automatically populated by
26
+ # the Shell API Platform and returned in the API response.
27
+ # @return [ErrorStatus]
28
+ attr_accessor :error
29
+
30
+ # A mapping from model property names to API property names.
31
+ def self.names
32
+ @_hash = {} if @_hash.nil?
33
+ @_hash['fee_items_summary'] = 'FeeItemsSummary'
34
+ @_hash['request_id'] = 'RequestId'
35
+ @_hash['error'] = 'Error'
36
+ @_hash
37
+ end
38
+
39
+ # An array for optional fields
40
+ def self.optionals
41
+ %w[
42
+ fee_items_summary
43
+ request_id
44
+ error
45
+ ]
46
+ end
47
+
48
+ # An array for nullable fields
49
+ def self.nullables
50
+ []
51
+ end
52
+
53
+ def initialize(fee_items_summary = SKIP,
54
+ request_id = SKIP,
55
+ error = SKIP)
56
+ @fee_items_summary = fee_items_summary unless fee_items_summary == SKIP
57
+ @request_id = request_id unless request_id == SKIP
58
+ @error = error unless error == SKIP
59
+ end
60
+
61
+ # Creates an instance of the object from a hash.
62
+ def self.from_hash(hash)
63
+ return nil unless hash
64
+
65
+ # Extract variables from the hash.
66
+ # Parameter is an array, so we need to iterate through it
67
+ fee_items_summary = nil
68
+ unless hash['FeeItemsSummary'].nil?
69
+ fee_items_summary = []
70
+ hash['FeeItemsSummary'].each do |structure|
71
+ fee_items_summary << (FeeItemSummaryAllOf0.from_hash(structure) if structure)
72
+ end
73
+ end
74
+
75
+ fee_items_summary = SKIP unless hash.key?('FeeItemsSummary')
76
+ request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
77
+ error = ErrorStatus.from_hash(hash['Error']) if hash['Error']
78
+
79
+ # Create object from extracted values.
80
+ FeeSummaryResponse.new(fee_items_summary,
81
+ request_id,
82
+ error)
83
+ end
84
+ end
85
+ end