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,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
+ # PricedTransSummaryResponse Model.
8
+ class PricedTransSummaryResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Array[PricedTransSummaryResponseTransactionsSummaryItems]]
14
+ attr_accessor :transactions_summary
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
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['transactions_summary'] = 'TransactionsSummary'
28
+ @_hash['error'] = 'Error'
29
+ @_hash['request_id'] = 'RequestId'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ %w[
36
+ transactions_summary
37
+ error
38
+ request_id
39
+ ]
40
+ end
41
+
42
+ # An array for nullable fields
43
+ def self.nullables
44
+ []
45
+ end
46
+
47
+ def initialize(transactions_summary = SKIP,
48
+ error = SKIP,
49
+ request_id = SKIP)
50
+ @transactions_summary = transactions_summary unless transactions_summary == SKIP
51
+ @error = error unless error == SKIP
52
+ @request_id = request_id unless request_id == 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
+ # Parameter is an array, so we need to iterate through it
61
+ transactions_summary = nil
62
+ unless hash['TransactionsSummary'].nil?
63
+ transactions_summary = []
64
+ hash['TransactionsSummary'].each do |structure|
65
+ transactions_summary << (PricedTransSummaryResponseTransactionsSummaryItems.from_hash(structure) if structure)
66
+ end
67
+ end
68
+
69
+ transactions_summary = SKIP unless hash.key?('TransactionsSummary')
70
+ error = ErrorStatus.from_hash(hash['Error']) if hash['Error']
71
+ request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
72
+
73
+ # Create object from extracted values.
74
+ PricedTransSummaryResponse.new(transactions_summary,
75
+ error,
76
+ request_id)
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,242 @@
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
+ # PricedTransSummaryResponseTransactionsSummaryItems Model.
8
+ class PricedTransSummaryResponseTransactionsSummaryItems < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Product Id
13
+ # @return [Integer]
14
+ attr_accessor :product_id
15
+
16
+ # Product Code
17
+ # Examples:
18
+ # 10 TMF Charges
19
+ # 11 Tunnel/Bridges
20
+ # 12 Motorway toll
21
+ # 13 Ferries
22
+ # @return [String]
23
+ attr_accessor :product_code
24
+
25
+ # Product Name
26
+ # Examples:
27
+ # Unleaded - High octane
28
+ # Unleaded - Medium octane
29
+ # Unleaded - Low octane
30
+ # Unleaded Environmental
31
+ # @return [String]
32
+ attr_accessor :product_name
33
+
34
+ # Product Group Id
35
+ # Example:
36
+ # 1 Parent Product Group
37
+ # 2 All Fuels
38
+ # 3 Motor gasoline
39
+ # 4 2 stroke
40
+ # 5 Autogas
41
+ # 6 CNG
42
+ # @return [Integer]
43
+ attr_accessor :product_group_id
44
+
45
+ # Product Group Name
46
+ # Example:
47
+ # 1 Parent Product Group
48
+ # 2 All Fuels
49
+ # 3 Motor gasoline
50
+ # 4 2 stroke
51
+ # 5 Autogas
52
+ # 6 CNG
53
+ # 7 Automotive Gas Oil
54
+ # @return [String]
55
+ attr_accessor :product_group_name
56
+
57
+ # Site Group Id
58
+ # Example: 202
59
+ # @return [Integer]
60
+ attr_accessor :site_group_id
61
+
62
+ # Site Group Name
63
+ # Example: CZ 9100 ECONOMY NETWORK
64
+ # @return [String]
65
+ attr_accessor :site_group_name
66
+
67
+ # Total Fuel Quantity
68
+ # @return [Integer]
69
+ attr_accessor :total_fuel_quantity
70
+
71
+ # Total Net amount in invoice currency
72
+ # @return [Integer]
73
+ attr_accessor :total_net_amount
74
+
75
+ # Total Gross amount in invoice currency
76
+ # @return [Integer]
77
+ attr_accessor :total_gross_amount
78
+
79
+ # ISO currency code
80
+ # Example: GBP
81
+ # @return [String]
82
+ attr_accessor :invoice_currency_code
83
+
84
+ # Currency symbol of the Invoice Currency Code
85
+ # Example: £, $
86
+ # @return [String]
87
+ attr_accessor :invoice_currency_symbol
88
+
89
+ # Sum of the retail net price
90
+ # @return [Float]
91
+ attr_accessor :customer_retail_value_total_net
92
+
93
+ # Sum of the retail gross price
94
+ # @return [Float]
95
+ attr_accessor :customer_retail_value_total_gross
96
+
97
+ # A mapping from model property names to API property names.
98
+ def self.names
99
+ @_hash = {} if @_hash.nil?
100
+ @_hash['product_id'] = 'ProductId'
101
+ @_hash['product_code'] = 'ProductCode'
102
+ @_hash['product_name'] = 'ProductName'
103
+ @_hash['product_group_id'] = 'ProductGroupId'
104
+ @_hash['product_group_name'] = 'ProductGroupName'
105
+ @_hash['site_group_id'] = 'SiteGroupId'
106
+ @_hash['site_group_name'] = 'SiteGroupName'
107
+ @_hash['total_fuel_quantity'] = 'TotalFuelQuantity'
108
+ @_hash['total_net_amount'] = 'TotalNetAmount'
109
+ @_hash['total_gross_amount'] = 'TotalGrossAmount'
110
+ @_hash['invoice_currency_code'] = 'InvoiceCurrencyCode'
111
+ @_hash['invoice_currency_symbol'] = 'InvoiceCurrencySymbol'
112
+ @_hash['customer_retail_value_total_net'] =
113
+ 'CustomerRetailValueTotalNet'
114
+ @_hash['customer_retail_value_total_gross'] =
115
+ 'CustomerRetailValueTotalGross'
116
+ @_hash
117
+ end
118
+
119
+ # An array for optional fields
120
+ def self.optionals
121
+ %w[
122
+ product_id
123
+ product_code
124
+ product_name
125
+ product_group_id
126
+ product_group_name
127
+ site_group_id
128
+ site_group_name
129
+ total_fuel_quantity
130
+ total_net_amount
131
+ total_gross_amount
132
+ invoice_currency_code
133
+ invoice_currency_symbol
134
+ customer_retail_value_total_net
135
+ customer_retail_value_total_gross
136
+ ]
137
+ end
138
+
139
+ # An array for nullable fields
140
+ def self.nullables
141
+ %w[
142
+ product_id
143
+ product_code
144
+ product_name
145
+ product_group_id
146
+ product_group_name
147
+ site_group_id
148
+ site_group_name
149
+ total_fuel_quantity
150
+ total_net_amount
151
+ total_gross_amount
152
+ invoice_currency_code
153
+ invoice_currency_symbol
154
+ customer_retail_value_total_net
155
+ customer_retail_value_total_gross
156
+ ]
157
+ end
158
+
159
+ def initialize(product_id = SKIP,
160
+ product_code = SKIP,
161
+ product_name = SKIP,
162
+ product_group_id = SKIP,
163
+ product_group_name = SKIP,
164
+ site_group_id = SKIP,
165
+ site_group_name = SKIP,
166
+ total_fuel_quantity = SKIP,
167
+ total_net_amount = SKIP,
168
+ total_gross_amount = SKIP,
169
+ invoice_currency_code = SKIP,
170
+ invoice_currency_symbol = SKIP,
171
+ customer_retail_value_total_net = SKIP,
172
+ customer_retail_value_total_gross = SKIP)
173
+ @product_id = product_id unless product_id == SKIP
174
+ @product_code = product_code unless product_code == SKIP
175
+ @product_name = product_name unless product_name == SKIP
176
+ @product_group_id = product_group_id unless product_group_id == SKIP
177
+ @product_group_name = product_group_name unless product_group_name == SKIP
178
+ @site_group_id = site_group_id unless site_group_id == SKIP
179
+ @site_group_name = site_group_name unless site_group_name == SKIP
180
+ @total_fuel_quantity = total_fuel_quantity unless total_fuel_quantity == SKIP
181
+ @total_net_amount = total_net_amount unless total_net_amount == SKIP
182
+ @total_gross_amount = total_gross_amount unless total_gross_amount == SKIP
183
+ @invoice_currency_code = invoice_currency_code unless invoice_currency_code == SKIP
184
+ @invoice_currency_symbol = invoice_currency_symbol unless invoice_currency_symbol == SKIP
185
+ unless customer_retail_value_total_net == SKIP
186
+ @customer_retail_value_total_net =
187
+ customer_retail_value_total_net
188
+ end
189
+ unless customer_retail_value_total_gross == SKIP
190
+ @customer_retail_value_total_gross =
191
+ customer_retail_value_total_gross
192
+ end
193
+ end
194
+
195
+ # Creates an instance of the object from a hash.
196
+ def self.from_hash(hash)
197
+ return nil unless hash
198
+
199
+ # Extract variables from the hash.
200
+ product_id = hash.key?('ProductId') ? hash['ProductId'] : SKIP
201
+ product_code = hash.key?('ProductCode') ? hash['ProductCode'] : SKIP
202
+ product_name = hash.key?('ProductName') ? hash['ProductName'] : SKIP
203
+ product_group_id =
204
+ hash.key?('ProductGroupId') ? hash['ProductGroupId'] : SKIP
205
+ product_group_name =
206
+ hash.key?('ProductGroupName') ? hash['ProductGroupName'] : SKIP
207
+ site_group_id = hash.key?('SiteGroupId') ? hash['SiteGroupId'] : SKIP
208
+ site_group_name =
209
+ hash.key?('SiteGroupName') ? hash['SiteGroupName'] : SKIP
210
+ total_fuel_quantity =
211
+ hash.key?('TotalFuelQuantity') ? hash['TotalFuelQuantity'] : SKIP
212
+ total_net_amount =
213
+ hash.key?('TotalNetAmount') ? hash['TotalNetAmount'] : SKIP
214
+ total_gross_amount =
215
+ hash.key?('TotalGrossAmount') ? hash['TotalGrossAmount'] : SKIP
216
+ invoice_currency_code =
217
+ hash.key?('InvoiceCurrencyCode') ? hash['InvoiceCurrencyCode'] : SKIP
218
+ invoice_currency_symbol =
219
+ hash.key?('InvoiceCurrencySymbol') ? hash['InvoiceCurrencySymbol'] : SKIP
220
+ customer_retail_value_total_net =
221
+ hash.key?('CustomerRetailValueTotalNet') ? hash['CustomerRetailValueTotalNet'] : SKIP
222
+ customer_retail_value_total_gross =
223
+ hash.key?('CustomerRetailValueTotalGross') ? hash['CustomerRetailValueTotalGross'] : SKIP
224
+
225
+ # Create object from extracted values.
226
+ PricedTransSummaryResponseTransactionsSummaryItems.new(product_id,
227
+ product_code,
228
+ product_name,
229
+ product_group_id,
230
+ product_group_name,
231
+ site_group_id,
232
+ site_group_name,
233
+ total_fuel_quantity,
234
+ total_net_amount,
235
+ total_gross_amount,
236
+ invoice_currency_code,
237
+ invoice_currency_symbol,
238
+ customer_retail_value_total_net,
239
+ customer_retail_value_total_gross)
240
+ end
241
+ end
242
+ end
@@ -0,0 +1,67 @@
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
+ # PricedTransactionItemsLocationItems Model.
8
+ class PricedTransactionItemsLocationItems < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Latitude for the Site Geographic Location
13
+ # Example: 37.4224764
14
+ # Note: - The value could be null/blank for fees item.
15
+ # @return [String]
16
+ attr_accessor :latitude
17
+
18
+ # Longitude for the Site Geographic Location
19
+ # Example: 122.0842499
20
+ # Note: - The value could be null/blank for fees item.
21
+ # @return [String]
22
+ attr_accessor :longitude
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['latitude'] = 'Latitude'
28
+ @_hash['longitude'] = 'Longitude'
29
+ @_hash
30
+ end
31
+
32
+ # An array for optional fields
33
+ def self.optionals
34
+ %w[
35
+ latitude
36
+ longitude
37
+ ]
38
+ end
39
+
40
+ # An array for nullable fields
41
+ def self.nullables
42
+ %w[
43
+ latitude
44
+ longitude
45
+ ]
46
+ end
47
+
48
+ def initialize(latitude = SKIP,
49
+ longitude = SKIP)
50
+ @latitude = latitude unless latitude == SKIP
51
+ @longitude = longitude unless longitude == SKIP
52
+ end
53
+
54
+ # Creates an instance of the object from a hash.
55
+ def self.from_hash(hash)
56
+ return nil unless hash
57
+
58
+ # Extract variables from the hash.
59
+ latitude = hash.key?('Latitude') ? hash['Latitude'] : SKIP
60
+ longitude = hash.key?('Longitude') ? hash['Longitude'] : SKIP
61
+
62
+ # Create object from extracted values.
63
+ PricedTransactionItemsLocationItems.new(latitude,
64
+ longitude)
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,27 @@
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
+ # Invoice status of the transactions. Mandatory Possible options:I - Invoiced,
8
+ # U – Un-Invoiced, A – All
9
+ class PricedTransactionReqV2InvoiceStatusEnum
10
+ PRICED_TRANSACTION_REQ_V2_INVOICE_STATUS_ENUM = [
11
+ # TODO: Write general description for I
12
+ I = 'I'.freeze,
13
+
14
+ # TODO: Write general description for U
15
+ U = 'U'.freeze,
16
+
17
+ # TODO: Write general description for A
18
+ A = 'A'.freeze
19
+ ].freeze
20
+
21
+ def self.validate(value)
22
+ return false if value.nil?
23
+
24
+ PRICED_TRANSACTION_REQ_V2_INVOICE_STATUS_ENUM.include?(value)
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,27 @@
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
+ # Pass below one of the value as per the required transaction period 1. Last 7
8
+ # Days 2. Last 30 Days 3. Last 90 Days
9
+ class PricedTransactionReqV2PeriodEnum
10
+ PRICED_TRANSACTION_REQ_V2_PERIOD_ENUM = [
11
+ # TODO: Write general description for ENUM_1
12
+ ENUM_1 = 1,
13
+
14
+ # TODO: Write general description for ENUM_2
15
+ ENUM_2 = 2,
16
+
17
+ # TODO: Write general description for ENUM_3
18
+ ENUM_3 = 3
19
+ ].freeze
20
+
21
+ def self.validate(value)
22
+ return false if value.nil?
23
+
24
+ PRICED_TRANSACTION_REQ_V2_PERIOD_ENUM.include?(value)
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,37 @@
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
+ # Allowed Sorting Options 1. TransactionDateAscending 2.
8
+ # TransactionDateDescending 3. GrossAmountDescending 4.
9
+ # GrossAmountAscending 5. NetAmountAscending 6. NetAmountDescensding
10
+ class PricedTransactionReqV2SortOrderEnum
11
+ PRICED_TRANSACTION_REQ_V2_SORT_ORDER_ENUM = [
12
+ # TODO: Write general description for ENUM_1
13
+ ENUM_1 = '1'.freeze,
14
+
15
+ # TODO: Write general description for ENUM_2
16
+ ENUM_2 = '2'.freeze,
17
+
18
+ # TODO: Write general description for ENUM_3
19
+ ENUM_3 = '3'.freeze,
20
+
21
+ # TODO: Write general description for ENUM_4
22
+ ENUM_4 = '4'.freeze,
23
+
24
+ # TODO: Write general description for ENUM_5
25
+ ENUM_5 = '5'.freeze,
26
+
27
+ # TODO: Write general description for ENUM_6
28
+ ENUM_6 = '6'.freeze
29
+ ].freeze
30
+
31
+ def self.validate(value)
32
+ return false if value.nil?
33
+
34
+ PRICED_TRANSACTION_REQ_V2_SORT_ORDER_ENUM.include?(value)
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,72 @@
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
+ # PricedTransactionRequestV2 Model.
8
+ class PricedTransactionRequestV2 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # This endpoint allows querying the transaction data (i.e. Priced, Billed
13
+ # and Unbilled sales items) from SFSBI. It provides a flexible search
14
+ # criteria and supports paging
15
+ # @return [PricedRequestData]
16
+ attr_accessor :filters
17
+
18
+ # Specify the page of results to be returned.
19
+ # @return [Integer]
20
+ attr_accessor :page
21
+
22
+ # Specify the number of records to returned; Max 1000
23
+ # @return [Integer]
24
+ attr_accessor :page_size
25
+
26
+ # A mapping from model property names to API property names.
27
+ def self.names
28
+ @_hash = {} if @_hash.nil?
29
+ @_hash['filters'] = 'Filters'
30
+ @_hash['page'] = 'Page'
31
+ @_hash['page_size'] = 'PageSize'
32
+ @_hash
33
+ end
34
+
35
+ # An array for optional fields
36
+ def self.optionals
37
+ %w[
38
+ filters
39
+ page
40
+ page_size
41
+ ]
42
+ end
43
+
44
+ # An array for nullable fields
45
+ def self.nullables
46
+ []
47
+ end
48
+
49
+ def initialize(filters = SKIP,
50
+ page = SKIP,
51
+ page_size = SKIP)
52
+ @filters = filters unless filters == SKIP
53
+ @page = page unless page == SKIP
54
+ @page_size = page_size unless page_size == SKIP
55
+ end
56
+
57
+ # Creates an instance of the object from a hash.
58
+ def self.from_hash(hash)
59
+ return nil unless hash
60
+
61
+ # Extract variables from the hash.
62
+ filters = PricedRequestData.from_hash(hash['Filters']) if hash['Filters']
63
+ page = hash.key?('Page') ? hash['Page'] : SKIP
64
+ page_size = hash.key?('PageSize') ? hash['PageSize'] : SKIP
65
+
66
+ # Create object from extracted values.
67
+ PricedTransactionRequestV2.new(filters,
68
+ page,
69
+ page_size)
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,23 @@
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
+ # Flag to check if there is any refund
8
+ class PricedTransactionRespV2RefundFlagEnum
9
+ PRICED_TRANSACTION_RESP_V2_REFUND_FLAG_ENUM = [
10
+ # TODO: Write general description for Y
11
+ Y = 'Y'.freeze,
12
+
13
+ # TODO: Write general description for N
14
+ N = 'N'.freeze
15
+ ].freeze
16
+
17
+ def self.validate(value)
18
+ return false if value.nil?
19
+
20
+ PRICED_TRANSACTION_RESP_V2_REFUND_FLAG_ENUM.include?(value)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,59 @@
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
+ # PricedTransactionResponse Model.
8
+ class PricedTransactionResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Array[PricedTransactionResponseTransactionsItems]]
14
+ attr_accessor :transactions
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['transactions'] = 'Transactions'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ transactions
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(transactions = SKIP)
36
+ @transactions = transactions unless transactions == 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
+ # Parameter is an array, so we need to iterate through it
45
+ transactions = nil
46
+ unless hash['Transactions'].nil?
47
+ transactions = []
48
+ hash['Transactions'].each do |structure|
49
+ transactions << (PricedTransactionResponseTransactionsItems.from_hash(structure) if structure)
50
+ end
51
+ end
52
+
53
+ transactions = SKIP unless hash.key?('Transactions')
54
+
55
+ # Create object from extracted values.
56
+ PricedTransactionResponse.new(transactions)
57
+ end
58
+ end
59
+ end