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,146 @@
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
+ # UpdateOdometerRequest Model.
8
+ class UpdateOdometerRequest < 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 (Shell 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
+ # @return [Integer]
24
+ attr_accessor :col_co_code
25
+
26
+ # Payer Id (i.e. Customer Id of the Payment Customer in Cards Platform) of
27
+ # the selected payer.
28
+ # Optional if PayerNumber is passed else Mandatory
29
+ # @return [Integer]
30
+ attr_accessor :payer_id
31
+
32
+ # Account Id (i.e. Customer Id of the Sub Account in GFN) of the selected
33
+ # account.
34
+ # Optional if AccountNumber is passed else Mandatory
35
+ # @return [Integer]
36
+ attr_accessor :account_id
37
+
38
+ # Account Number (ex: GB000000123) of the selected account.
39
+ # Optional if AccountId is passed else Mandatory
40
+ # @return [String]
41
+ attr_accessor :account_number
42
+
43
+ # Account Number (ex: GB000000123) of the selected account.
44
+ # Optional if AccountId is passed else Mandatory
45
+ # @return [Array[UpdateOdometer]]
46
+ attr_accessor :update_odometers
47
+
48
+ # True/False.
49
+ # Optional.
50
+ # Default: False
51
+ # If true, the caller would be notified back with the status as success or
52
+ # failure after the update odometer is processed.
53
+ # @return [TrueClass | FalseClass]
54
+ attr_accessor :notify_caller
55
+
56
+ # The caller to be notified with the status of the update odometer.
57
+ # Mandatory, if NotifyCaller is true.
58
+ # @return [String]
59
+ attr_accessor :caller
60
+
61
+ # A mapping from model property names to API property names.
62
+ def self.names
63
+ @_hash = {} if @_hash.nil?
64
+ @_hash['col_co_id'] = 'ColCoId'
65
+ @_hash['col_co_code'] = 'ColCoCode'
66
+ @_hash['payer_id'] = 'PayerId'
67
+ @_hash['account_id'] = 'AccountId'
68
+ @_hash['account_number'] = 'AccountNumber'
69
+ @_hash['update_odometers'] = 'UpdateOdometers'
70
+ @_hash['notify_caller'] = 'NotifyCaller'
71
+ @_hash['caller'] = 'Caller'
72
+ @_hash
73
+ end
74
+
75
+ # An array for optional fields
76
+ def self.optionals
77
+ %w[
78
+ col_co_id
79
+ col_co_code
80
+ payer_id
81
+ account_id
82
+ account_number
83
+ update_odometers
84
+ notify_caller
85
+ caller
86
+ ]
87
+ end
88
+
89
+ # An array for nullable fields
90
+ def self.nullables
91
+ []
92
+ end
93
+
94
+ def initialize(col_co_id = SKIP,
95
+ col_co_code = SKIP,
96
+ payer_id = SKIP,
97
+ account_id = SKIP,
98
+ account_number = SKIP,
99
+ update_odometers = SKIP,
100
+ notify_caller = SKIP,
101
+ caller = SKIP)
102
+ @col_co_id = col_co_id unless col_co_id == SKIP
103
+ @col_co_code = col_co_code unless col_co_code == SKIP
104
+ @payer_id = payer_id unless payer_id == SKIP
105
+ @account_id = account_id unless account_id == SKIP
106
+ @account_number = account_number unless account_number == SKIP
107
+ @update_odometers = update_odometers unless update_odometers == SKIP
108
+ @notify_caller = notify_caller unless notify_caller == SKIP
109
+ @caller = caller unless caller == SKIP
110
+ end
111
+
112
+ # Creates an instance of the object from a hash.
113
+ def self.from_hash(hash)
114
+ return nil unless hash
115
+
116
+ # Extract variables from the hash.
117
+ col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
118
+ col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
119
+ payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
120
+ account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP
121
+ account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
122
+ # Parameter is an array, so we need to iterate through it
123
+ update_odometers = nil
124
+ unless hash['UpdateOdometers'].nil?
125
+ update_odometers = []
126
+ hash['UpdateOdometers'].each do |structure|
127
+ update_odometers << (UpdateOdometer.from_hash(structure) if structure)
128
+ end
129
+ end
130
+
131
+ update_odometers = SKIP unless hash.key?('UpdateOdometers')
132
+ notify_caller = hash.key?('NotifyCaller') ? hash['NotifyCaller'] : SKIP
133
+ caller = hash.key?('Caller') ? hash['Caller'] : SKIP
134
+
135
+ # Create object from extracted values.
136
+ UpdateOdometerRequest.new(col_co_id,
137
+ col_co_code,
138
+ payer_id,
139
+ account_id,
140
+ account_number,
141
+ update_odometers,
142
+ notify_caller,
143
+ caller)
144
+ end
145
+ end
146
+ end
@@ -0,0 +1,93 @@
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
+ # UpdateOdometerResponse Model.
8
+ class UpdateOdometerResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Main reference number for tracking.
13
+ # @return [Integer]
14
+ attr_accessor :service_reference
15
+
16
+ # Main reference number for tracking.
17
+ # @return [Array[UpdateOdometerReference]]
18
+ attr_accessor :update_odometer_references
19
+
20
+ # Main reference number for tracking.
21
+ # @return [ErrorStatus]
22
+ attr_accessor :error
23
+
24
+ # API Request Id
25
+ # @return [String]
26
+ attr_accessor :request_id
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['service_reference'] = 'ServiceReference'
32
+ @_hash['update_odometer_references'] = 'UpdateOdometerReferences'
33
+ @_hash['error'] = 'Error'
34
+ @_hash['request_id'] = 'RequestId'
35
+ @_hash
36
+ end
37
+
38
+ # An array for optional fields
39
+ def self.optionals
40
+ %w[
41
+ service_reference
42
+ update_odometer_references
43
+ error
44
+ request_id
45
+ ]
46
+ end
47
+
48
+ # An array for nullable fields
49
+ def self.nullables
50
+ []
51
+ end
52
+
53
+ def initialize(service_reference = SKIP,
54
+ update_odometer_references = SKIP,
55
+ error = SKIP,
56
+ request_id = SKIP)
57
+ @service_reference = service_reference unless service_reference == SKIP
58
+ unless update_odometer_references == SKIP
59
+ @update_odometer_references =
60
+ update_odometer_references
61
+ end
62
+ @error = error unless error == SKIP
63
+ @request_id = request_id unless request_id == SKIP
64
+ end
65
+
66
+ # Creates an instance of the object from a hash.
67
+ def self.from_hash(hash)
68
+ return nil unless hash
69
+
70
+ # Extract variables from the hash.
71
+ service_reference =
72
+ hash.key?('ServiceReference') ? hash['ServiceReference'] : SKIP
73
+ # Parameter is an array, so we need to iterate through it
74
+ update_odometer_references = nil
75
+ unless hash['UpdateOdometerReferences'].nil?
76
+ update_odometer_references = []
77
+ hash['UpdateOdometerReferences'].each do |structure|
78
+ update_odometer_references << (UpdateOdometerReference.from_hash(structure) if structure)
79
+ end
80
+ end
81
+
82
+ update_odometer_references = SKIP unless hash.key?('UpdateOdometerReferences')
83
+ error = ErrorStatus.from_hash(hash['Error']) if hash['Error']
84
+ request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
85
+
86
+ # Create object from extracted values.
87
+ UpdateOdometerResponse.new(service_reference,
88
+ update_odometer_references,
89
+ error,
90
+ request_id)
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,202 @@
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
+ # UsageSummary Model.
8
+ class UsageSummary < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Transaction date.
13
+ # The records will be sorted by this field in ascending order.
14
+ # Format: yyyyMMdd
15
+ # @return [String]
16
+ attr_accessor :date
17
+
18
+ # Product Id
19
+ # @return [Integer]
20
+ attr_accessor :product_id
21
+
22
+ # Client Product code
23
+ # @return [String]
24
+ attr_accessor :product_code
25
+
26
+ # Product name in English
27
+ # @return [String]
28
+ attr_accessor :product_name
29
+
30
+ # Whether the product is fuel or non-fuel
31
+ # @return [TrueClass | FalseClass]
32
+ attr_accessor :is_fuel_product
33
+
34
+ # Site Group Id
35
+ # @return [Integer]
36
+ attr_accessor :site_group_id
37
+
38
+ # Site Group Name
39
+ # @return [String]
40
+ attr_accessor :site_group_name
41
+
42
+ # Total Volume
43
+ # @return [Float]
44
+ attr_accessor :total_volume
45
+
46
+ # Total Gross in Customer Currency
47
+ # @return [Float]
48
+ attr_accessor :total_gross
49
+
50
+ # Total Net in Customer Currency
51
+ # @return [Float]
52
+ attr_accessor :total_net
53
+
54
+ # Customer Currency Code
55
+ # @return [String]
56
+ attr_accessor :currency_code
57
+
58
+ # Customer Currency Symbol
59
+ # @return [String]
60
+ attr_accessor :currency_symbol
61
+
62
+ # Product group ID
63
+ # @return [Integer]
64
+ attr_accessor :product_group_id
65
+
66
+ # Product group Name
67
+ # @return [String]
68
+ attr_accessor :product_group_name
69
+
70
+ # A mapping from model property names to API property names.
71
+ def self.names
72
+ @_hash = {} if @_hash.nil?
73
+ @_hash['date'] = 'Date'
74
+ @_hash['product_id'] = 'ProductId'
75
+ @_hash['product_code'] = 'ProductCode'
76
+ @_hash['product_name'] = 'ProductName'
77
+ @_hash['is_fuel_product'] = 'IsFuelProduct'
78
+ @_hash['site_group_id'] = 'SiteGroupId'
79
+ @_hash['site_group_name'] = 'SiteGroupName'
80
+ @_hash['total_volume'] = 'TotalVolume'
81
+ @_hash['total_gross'] = 'TotalGross'
82
+ @_hash['total_net'] = 'TotalNet'
83
+ @_hash['currency_code'] = 'CurrencyCode'
84
+ @_hash['currency_symbol'] = 'CurrencySymbol'
85
+ @_hash['product_group_id'] = 'ProductGroupID'
86
+ @_hash['product_group_name'] = 'ProductGroupName'
87
+ @_hash
88
+ end
89
+
90
+ # An array for optional fields
91
+ def self.optionals
92
+ %w[
93
+ date
94
+ product_id
95
+ product_code
96
+ product_name
97
+ is_fuel_product
98
+ site_group_id
99
+ site_group_name
100
+ total_volume
101
+ total_gross
102
+ total_net
103
+ currency_code
104
+ currency_symbol
105
+ product_group_id
106
+ product_group_name
107
+ ]
108
+ end
109
+
110
+ # An array for nullable fields
111
+ def self.nullables
112
+ %w[
113
+ date
114
+ product_id
115
+ product_code
116
+ product_name
117
+ is_fuel_product
118
+ site_group_id
119
+ site_group_name
120
+ total_volume
121
+ total_gross
122
+ total_net
123
+ currency_code
124
+ currency_symbol
125
+ product_group_id
126
+ product_group_name
127
+ ]
128
+ end
129
+
130
+ def initialize(date = SKIP,
131
+ product_id = SKIP,
132
+ product_code = SKIP,
133
+ product_name = SKIP,
134
+ is_fuel_product = SKIP,
135
+ site_group_id = SKIP,
136
+ site_group_name = SKIP,
137
+ total_volume = SKIP,
138
+ total_gross = SKIP,
139
+ total_net = SKIP,
140
+ currency_code = SKIP,
141
+ currency_symbol = SKIP,
142
+ product_group_id = SKIP,
143
+ product_group_name = SKIP)
144
+ @date = date unless date == SKIP
145
+ @product_id = product_id unless product_id == SKIP
146
+ @product_code = product_code unless product_code == SKIP
147
+ @product_name = product_name unless product_name == SKIP
148
+ @is_fuel_product = is_fuel_product unless is_fuel_product == SKIP
149
+ @site_group_id = site_group_id unless site_group_id == SKIP
150
+ @site_group_name = site_group_name unless site_group_name == SKIP
151
+ @total_volume = total_volume unless total_volume == SKIP
152
+ @total_gross = total_gross unless total_gross == SKIP
153
+ @total_net = total_net unless total_net == SKIP
154
+ @currency_code = currency_code unless currency_code == SKIP
155
+ @currency_symbol = currency_symbol unless currency_symbol == SKIP
156
+ @product_group_id = product_group_id unless product_group_id == SKIP
157
+ @product_group_name = product_group_name unless product_group_name == SKIP
158
+ end
159
+
160
+ # Creates an instance of the object from a hash.
161
+ def self.from_hash(hash)
162
+ return nil unless hash
163
+
164
+ # Extract variables from the hash.
165
+ date = hash.key?('Date') ? hash['Date'] : SKIP
166
+ product_id = hash.key?('ProductId') ? hash['ProductId'] : SKIP
167
+ product_code = hash.key?('ProductCode') ? hash['ProductCode'] : SKIP
168
+ product_name = hash.key?('ProductName') ? hash['ProductName'] : SKIP
169
+ is_fuel_product =
170
+ hash.key?('IsFuelProduct') ? hash['IsFuelProduct'] : SKIP
171
+ site_group_id = hash.key?('SiteGroupId') ? hash['SiteGroupId'] : SKIP
172
+ site_group_name =
173
+ hash.key?('SiteGroupName') ? hash['SiteGroupName'] : SKIP
174
+ total_volume = hash.key?('TotalVolume') ? hash['TotalVolume'] : SKIP
175
+ total_gross = hash.key?('TotalGross') ? hash['TotalGross'] : SKIP
176
+ total_net = hash.key?('TotalNet') ? hash['TotalNet'] : SKIP
177
+ currency_code = hash.key?('CurrencyCode') ? hash['CurrencyCode'] : SKIP
178
+ currency_symbol =
179
+ hash.key?('CurrencySymbol') ? hash['CurrencySymbol'] : SKIP
180
+ product_group_id =
181
+ hash.key?('ProductGroupID') ? hash['ProductGroupID'] : SKIP
182
+ product_group_name =
183
+ hash.key?('ProductGroupName') ? hash['ProductGroupName'] : SKIP
184
+
185
+ # Create object from extracted values.
186
+ UsageSummary.new(date,
187
+ product_id,
188
+ product_code,
189
+ product_name,
190
+ is_fuel_product,
191
+ site_group_id,
192
+ site_group_name,
193
+ total_volume,
194
+ total_gross,
195
+ total_net,
196
+ currency_code,
197
+ currency_symbol,
198
+ product_group_id,
199
+ product_group_name)
200
+ end
201
+ end
202
+ end
@@ -0,0 +1,118 @@
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
+ # VolumeBasedBonusRequest Model.
8
+ class VolumeBasedBonusRequest < 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
+ # Payer Id of the selected payer.
30
+ # Optional if PayerNumber is passed else Mandatory
31
+ # @return [Integer]
32
+ attr_accessor :payer_id
33
+
34
+ # Payer Number of the selected payer.
35
+ # Optional if PayerId is passed else Mandatory
36
+ # @return [String]
37
+ attr_accessor :payer_number
38
+
39
+ # The API will return the details of the previously calculated/paid bonus
40
+ # and fuel consumption (Volume) in the response when this flag is ‘True’.
41
+ # @return [TrueClass | FalseClass]
42
+ attr_accessor :include_history
43
+
44
+ # The API will return the details of the monthly breakup of current period
45
+ # fuel consumption (Volume) in the response when this flag is ‘True’.
46
+ # @return [TrueClass | FalseClass]
47
+ attr_accessor :include_current_period_volume
48
+
49
+ # A mapping from model property names to API property names.
50
+ def self.names
51
+ @_hash = {} if @_hash.nil?
52
+ @_hash['col_co_id'] = 'ColCoId'
53
+ @_hash['col_co_code'] = 'ColCoCode'
54
+ @_hash['payer_id'] = 'PayerId'
55
+ @_hash['payer_number'] = 'PayerNumber'
56
+ @_hash['include_history'] = 'IncludeHistory'
57
+ @_hash['include_current_period_volume'] = 'IncludeCurrentPeriodVolume'
58
+ @_hash
59
+ end
60
+
61
+ # An array for optional fields
62
+ def self.optionals
63
+ %w[
64
+ col_co_id
65
+ col_co_code
66
+ payer_id
67
+ payer_number
68
+ include_history
69
+ include_current_period_volume
70
+ ]
71
+ end
72
+
73
+ # An array for nullable fields
74
+ def self.nullables
75
+ []
76
+ end
77
+
78
+ def initialize(col_co_id = SKIP,
79
+ col_co_code = SKIP,
80
+ payer_id = SKIP,
81
+ payer_number = SKIP,
82
+ include_history = SKIP,
83
+ include_current_period_volume = SKIP)
84
+ @col_co_id = col_co_id unless col_co_id == SKIP
85
+ @col_co_code = col_co_code unless col_co_code == SKIP
86
+ @payer_id = payer_id unless payer_id == SKIP
87
+ @payer_number = payer_number unless payer_number == SKIP
88
+ @include_history = include_history unless include_history == SKIP
89
+ unless include_current_period_volume == SKIP
90
+ @include_current_period_volume =
91
+ include_current_period_volume
92
+ end
93
+ end
94
+
95
+ # Creates an instance of the object from a hash.
96
+ def self.from_hash(hash)
97
+ return nil unless hash
98
+
99
+ # Extract variables from the hash.
100
+ col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
101
+ col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
102
+ payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
103
+ payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
104
+ include_history =
105
+ hash.key?('IncludeHistory') ? hash['IncludeHistory'] : SKIP
106
+ include_current_period_volume =
107
+ hash.key?('IncludeCurrentPeriodVolume') ? hash['IncludeCurrentPeriodVolume'] : SKIP
108
+
109
+ # Create object from extracted values.
110
+ VolumeBasedBonusRequest.new(col_co_id,
111
+ col_co_code,
112
+ payer_id,
113
+ payer_number,
114
+ include_history,
115
+ include_current_period_volume)
116
+ end
117
+ end
118
+ end
@@ -0,0 +1,120 @@
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
+ # VolumeBasedBonusResponse Model.
8
+ class VolumeBasedBonusResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Array[BonusConfiguration]]
14
+ attr_accessor :configuration
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Array[CurrentVolume]]
18
+ attr_accessor :current_period_consumption
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Array[BonusHistory]]
22
+ attr_accessor :historical_bonus_paid
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [ErrorStatus]
26
+ attr_accessor :error
27
+
28
+ # API Request Id
29
+ # @return [String]
30
+ attr_accessor :request_id
31
+
32
+ # A mapping from model property names to API property names.
33
+ def self.names
34
+ @_hash = {} if @_hash.nil?
35
+ @_hash['configuration'] = 'Configuration'
36
+ @_hash['current_period_consumption'] = 'CurrentPeriodConsumption'
37
+ @_hash['historical_bonus_paid'] = 'HistoricalBonusPaid'
38
+ @_hash['error'] = 'Error'
39
+ @_hash['request_id'] = 'RequestId'
40
+ @_hash
41
+ end
42
+
43
+ # An array for optional fields
44
+ def self.optionals
45
+ %w[
46
+ configuration
47
+ current_period_consumption
48
+ historical_bonus_paid
49
+ error
50
+ request_id
51
+ ]
52
+ end
53
+
54
+ # An array for nullable fields
55
+ def self.nullables
56
+ []
57
+ end
58
+
59
+ def initialize(configuration = SKIP,
60
+ current_period_consumption = SKIP,
61
+ historical_bonus_paid = SKIP,
62
+ error = SKIP,
63
+ request_id = SKIP)
64
+ @configuration = configuration unless configuration == SKIP
65
+ unless current_period_consumption == SKIP
66
+ @current_period_consumption =
67
+ current_period_consumption
68
+ end
69
+ @historical_bonus_paid = historical_bonus_paid unless historical_bonus_paid == SKIP
70
+ @error = error unless error == SKIP
71
+ @request_id = request_id unless request_id == SKIP
72
+ end
73
+
74
+ # Creates an instance of the object from a hash.
75
+ def self.from_hash(hash)
76
+ return nil unless hash
77
+
78
+ # Extract variables from the hash.
79
+ # Parameter is an array, so we need to iterate through it
80
+ configuration = nil
81
+ unless hash['Configuration'].nil?
82
+ configuration = []
83
+ hash['Configuration'].each do |structure|
84
+ configuration << (BonusConfiguration.from_hash(structure) if structure)
85
+ end
86
+ end
87
+
88
+ configuration = SKIP unless hash.key?('Configuration')
89
+ # Parameter is an array, so we need to iterate through it
90
+ current_period_consumption = nil
91
+ unless hash['CurrentPeriodConsumption'].nil?
92
+ current_period_consumption = []
93
+ hash['CurrentPeriodConsumption'].each do |structure|
94
+ current_period_consumption << (CurrentVolume.from_hash(structure) if structure)
95
+ end
96
+ end
97
+
98
+ current_period_consumption = SKIP unless hash.key?('CurrentPeriodConsumption')
99
+ # Parameter is an array, so we need to iterate through it
100
+ historical_bonus_paid = nil
101
+ unless hash['HistoricalBonusPaid'].nil?
102
+ historical_bonus_paid = []
103
+ hash['HistoricalBonusPaid'].each do |structure|
104
+ historical_bonus_paid << (BonusHistory.from_hash(structure) if structure)
105
+ end
106
+ end
107
+
108
+ historical_bonus_paid = SKIP unless hash.key?('HistoricalBonusPaid')
109
+ error = ErrorStatus.from_hash(hash['Error']) if hash['Error']
110
+ request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
111
+
112
+ # Create object from extracted values.
113
+ VolumeBasedBonusResponse.new(configuration,
114
+ current_period_consumption,
115
+ historical_bonus_paid,
116
+ error,
117
+ request_id)
118
+ end
119
+ end
120
+ end