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,110 @@
1
+ # shell_data_reporting_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellDataReportingApIs
7
+ # PricedTransactionResponseV2 Model.
8
+ class PricedTransactionResponseV2 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Mandatory UUID (according to RFC 4122 standards) for requests and
13
+ # responses. This will be played back in the response from the req
14
+ # @return [String]
15
+ attr_accessor :request_id
16
+
17
+ # Indicates overall status of the request
18
+ # @return [String]
19
+ attr_accessor :status
20
+
21
+ # Indicates overall status of the request
22
+ # @return [Array[PricedResponseData]]
23
+ attr_accessor :data
24
+
25
+ # Current page
26
+ # @return [Integer]
27
+ attr_accessor :page
28
+
29
+ # Number of records returned in the response
30
+ # @return [Integer]
31
+ attr_accessor :page_size
32
+
33
+ # Total number of pages available for the requested data
34
+ # @return [Integer]
35
+ attr_accessor :total_pages
36
+
37
+ # A mapping from model property names to API property names.
38
+ def self.names
39
+ @_hash = {} if @_hash.nil?
40
+ @_hash['request_id'] = 'RequestId'
41
+ @_hash['status'] = 'Status'
42
+ @_hash['data'] = 'Data'
43
+ @_hash['page'] = 'Page'
44
+ @_hash['page_size'] = 'PageSize'
45
+ @_hash['total_pages'] = 'TotalPages'
46
+ @_hash
47
+ end
48
+
49
+ # An array for optional fields
50
+ def self.optionals
51
+ %w[
52
+ request_id
53
+ status
54
+ data
55
+ page
56
+ page_size
57
+ total_pages
58
+ ]
59
+ end
60
+
61
+ # An array for nullable fields
62
+ def self.nullables
63
+ []
64
+ end
65
+
66
+ def initialize(request_id = SKIP,
67
+ status = SKIP,
68
+ data = SKIP,
69
+ page = SKIP,
70
+ page_size = SKIP,
71
+ total_pages = SKIP)
72
+ @request_id = request_id unless request_id == SKIP
73
+ @status = status unless status == SKIP
74
+ @data = data unless data == SKIP
75
+ @page = page unless page == SKIP
76
+ @page_size = page_size unless page_size == SKIP
77
+ @total_pages = total_pages unless total_pages == SKIP
78
+ end
79
+
80
+ # Creates an instance of the object from a hash.
81
+ def self.from_hash(hash)
82
+ return nil unless hash
83
+
84
+ # Extract variables from the hash.
85
+ request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
86
+ status = hash.key?('Status') ? hash['Status'] : SKIP
87
+ # Parameter is an array, so we need to iterate through it
88
+ data = nil
89
+ unless hash['Data'].nil?
90
+ data = []
91
+ hash['Data'].each do |structure|
92
+ data << (PricedResponseData.from_hash(structure) if structure)
93
+ end
94
+ end
95
+
96
+ data = SKIP unless hash.key?('Data')
97
+ page = hash.key?('Page') ? hash['Page'] : SKIP
98
+ page_size = hash.key?('PageSize') ? hash['PageSize'] : SKIP
99
+ total_pages = hash.key?('TotalPages') ? hash['TotalPages'] : SKIP
100
+
101
+ # Create object from extracted values.
102
+ PricedTransactionResponseV2.new(request_id,
103
+ status,
104
+ data,
105
+ page,
106
+ page_size,
107
+ total_pages)
108
+ end
109
+ end
110
+ end
@@ -0,0 +1,115 @@
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
+ # PricingCurrentVolume Model.
8
+ class PricingCurrentVolume < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Bonus or association bonus configuration identifier that is associated to
13
+ # the payer.
14
+ # @return [Integer]
15
+ attr_accessor :fee_rule_id
16
+
17
+ # Bonus or association bonus configuration description that is associated to
18
+ # the payer
19
+ # @return [String]
20
+ attr_accessor :fee_rule_description
21
+
22
+ # Pricing current period Pricing Price Rule ID that is associated to the
23
+ # payer.
24
+ # @return [Integer]
25
+ attr_accessor :price_rule_id
26
+
27
+ # Pricing current period pricing rule description that is associated to the
28
+ # payer
29
+ # @return [String]
30
+ attr_accessor :price_rule_description
31
+
32
+ # Total volume consumption for the current period.
33
+ # @return [Float]
34
+ attr_accessor :total_volume
35
+
36
+ # Next Fee Rule Creation Date for that is associated to the payer.
37
+ # Format: YYYYMMDD
38
+ # @return [String]
39
+ attr_accessor :next_fee_creation_date
40
+
41
+ # A mapping from model property names to API property names.
42
+ def self.names
43
+ @_hash = {} if @_hash.nil?
44
+ @_hash['fee_rule_id'] = 'FeeRuleId'
45
+ @_hash['fee_rule_description'] = 'FeeRuleDescription'
46
+ @_hash['price_rule_id'] = 'PriceRuleID'
47
+ @_hash['price_rule_description'] = 'PriceRuleDescription'
48
+ @_hash['total_volume'] = 'TotalVolume'
49
+ @_hash['next_fee_creation_date'] = 'NextFeeCreationDate'
50
+ @_hash
51
+ end
52
+
53
+ # An array for optional fields
54
+ def self.optionals
55
+ %w[
56
+ fee_rule_id
57
+ fee_rule_description
58
+ price_rule_id
59
+ price_rule_description
60
+ total_volume
61
+ next_fee_creation_date
62
+ ]
63
+ end
64
+
65
+ # An array for nullable fields
66
+ def self.nullables
67
+ %w[
68
+ fee_rule_id
69
+ fee_rule_description
70
+ price_rule_id
71
+ price_rule_description
72
+ total_volume
73
+ next_fee_creation_date
74
+ ]
75
+ end
76
+
77
+ def initialize(fee_rule_id = SKIP,
78
+ fee_rule_description = SKIP,
79
+ price_rule_id = SKIP,
80
+ price_rule_description = SKIP,
81
+ total_volume = SKIP,
82
+ next_fee_creation_date = SKIP)
83
+ @fee_rule_id = fee_rule_id unless fee_rule_id == SKIP
84
+ @fee_rule_description = fee_rule_description unless fee_rule_description == SKIP
85
+ @price_rule_id = price_rule_id unless price_rule_id == SKIP
86
+ @price_rule_description = price_rule_description unless price_rule_description == SKIP
87
+ @total_volume = total_volume unless total_volume == SKIP
88
+ @next_fee_creation_date = next_fee_creation_date unless next_fee_creation_date == SKIP
89
+ end
90
+
91
+ # Creates an instance of the object from a hash.
92
+ def self.from_hash(hash)
93
+ return nil unless hash
94
+
95
+ # Extract variables from the hash.
96
+ fee_rule_id = hash.key?('FeeRuleId') ? hash['FeeRuleId'] : SKIP
97
+ fee_rule_description =
98
+ hash.key?('FeeRuleDescription') ? hash['FeeRuleDescription'] : SKIP
99
+ price_rule_id = hash.key?('PriceRuleID') ? hash['PriceRuleID'] : SKIP
100
+ price_rule_description =
101
+ hash.key?('PriceRuleDescription') ? hash['PriceRuleDescription'] : SKIP
102
+ total_volume = hash.key?('TotalVolume') ? hash['TotalVolume'] : SKIP
103
+ next_fee_creation_date =
104
+ hash.key?('NextFeeCreationDate') ? hash['NextFeeCreationDate'] : SKIP
105
+
106
+ # Create object from extracted values.
107
+ PricingCurrentVolume.new(fee_rule_id,
108
+ fee_rule_description,
109
+ price_rule_id,
110
+ price_rule_description,
111
+ total_volume,
112
+ next_fee_creation_date)
113
+ end
114
+ end
115
+ end
@@ -0,0 +1,105 @@
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
+ # PricingHistory Model.
8
+ class PricingHistory < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Pricing History Period Start date and should be the first date of the
13
+ # month.
14
+ # Format: YYYYMMDD
15
+ # @return [String]
16
+ attr_accessor :from_date
17
+
18
+ # Pricing History Period end date and should be the last date of the period
19
+ # month.
20
+ # Format: YYYYMMDD
21
+ # @return [String]
22
+ attr_accessor :to_date
23
+
24
+ # Pricing History Period Fees Rule ID that is associated to the period of
25
+ # that associated payer.
26
+ # Example: 8101
27
+ # @return [Integer]
28
+ attr_accessor :fees_rule_id
29
+
30
+ # Pricing History Period Fees Rule Description that is associated to the
31
+ # period of that associated payer.
32
+ # @return [String]
33
+ attr_accessor :fees_rule_description
34
+
35
+ # Total Quantity for the Pricing History Period that is associated to that
36
+ # payer.
37
+ # @return [Float]
38
+ attr_accessor :total_volume
39
+
40
+ # A mapping from model property names to API property names.
41
+ def self.names
42
+ @_hash = {} if @_hash.nil?
43
+ @_hash['from_date'] = 'FromDate'
44
+ @_hash['to_date'] = 'ToDate'
45
+ @_hash['fees_rule_id'] = 'FeesRuleID'
46
+ @_hash['fees_rule_description'] = 'FeesRuleDescription'
47
+ @_hash['total_volume'] = 'TotalVolume'
48
+ @_hash
49
+ end
50
+
51
+ # An array for optional fields
52
+ def self.optionals
53
+ %w[
54
+ from_date
55
+ to_date
56
+ fees_rule_id
57
+ fees_rule_description
58
+ total_volume
59
+ ]
60
+ end
61
+
62
+ # An array for nullable fields
63
+ def self.nullables
64
+ %w[
65
+ from_date
66
+ to_date
67
+ fees_rule_id
68
+ fees_rule_description
69
+ total_volume
70
+ ]
71
+ end
72
+
73
+ def initialize(from_date = SKIP,
74
+ to_date = SKIP,
75
+ fees_rule_id = SKIP,
76
+ fees_rule_description = SKIP,
77
+ total_volume = SKIP)
78
+ @from_date = from_date unless from_date == SKIP
79
+ @to_date = to_date unless to_date == SKIP
80
+ @fees_rule_id = fees_rule_id unless fees_rule_id == SKIP
81
+ @fees_rule_description = fees_rule_description unless fees_rule_description == SKIP
82
+ @total_volume = total_volume unless total_volume == SKIP
83
+ end
84
+
85
+ # Creates an instance of the object from a hash.
86
+ def self.from_hash(hash)
87
+ return nil unless hash
88
+
89
+ # Extract variables from the hash.
90
+ from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
91
+ to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP
92
+ fees_rule_id = hash.key?('FeesRuleID') ? hash['FeesRuleID'] : SKIP
93
+ fees_rule_description =
94
+ hash.key?('FeesRuleDescription') ? hash['FeesRuleDescription'] : SKIP
95
+ total_volume = hash.key?('TotalVolume') ? hash['TotalVolume'] : SKIP
96
+
97
+ # Create object from extracted values.
98
+ PricingHistory.new(from_date,
99
+ to_date,
100
+ fees_rule_id,
101
+ fees_rule_description,
102
+ total_volume)
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,114 @@
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
+ # PurchaseCategories Model.
8
+ class PurchaseCategories < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Purchase category Id
13
+ # @return [Integer]
14
+ attr_accessor :id
15
+
16
+ # Purchase category code
17
+ # Example: 0,1, 2 etc.
18
+ # Full list below:
19
+ # 0 - All Fuels (without VP) and Lubricants
20
+ # 1 - Fuel Save only
21
+ # 2 - Fuel Save and Lubricants
22
+ # 3 - No Restrictions
23
+ # 4 - VP and Fuel Save
24
+ # 5 - Diesel ONLY
25
+ # 6 - Diesel and Lubricants
26
+ # 7 - VP and Lubricants
27
+ # 8 - VP and Fuel Save and Lubricants
28
+ # @return [String]
29
+ attr_accessor :code
30
+
31
+ # Purchase category name
32
+ # Example: Fuel Save Only
33
+ # Full list below:
34
+ # 0 - All Fuels (without VP) and Lubricants
35
+ # 1 - Fuel Save only
36
+ # 2 - Fuel Save and Lubricants
37
+ # 3 - No Restrictions
38
+ # 4 - VP and Fuel Save
39
+ # 5 - Diesel ONLY
40
+ # 6 - Diesel and Lubricants
41
+ # 7 - VP and Lubricants
42
+ # 8 - VP and Fuel Save and Lubricants
43
+ # @return [String]
44
+ attr_accessor :name
45
+
46
+ # If True then PurchaseCategory can be used while submitting new order cards
47
+ # requests.
48
+ # If false this PurchaseCategory will not be used for Ordering Cards.
49
+ # @return [TrueClass | FalseClass]
50
+ attr_accessor :is_visible
51
+
52
+ # List of Default product groups
53
+ # @return [String]
54
+ attr_accessor :product_groups
55
+
56
+ # A mapping from model property names to API property names.
57
+ def self.names
58
+ @_hash = {} if @_hash.nil?
59
+ @_hash['id'] = 'Id'
60
+ @_hash['code'] = 'Code'
61
+ @_hash['name'] = 'Name'
62
+ @_hash['is_visible'] = 'IsVisible'
63
+ @_hash['product_groups'] = 'ProductGroups'
64
+ @_hash
65
+ end
66
+
67
+ # An array for optional fields
68
+ def self.optionals
69
+ %w[
70
+ id
71
+ code
72
+ name
73
+ is_visible
74
+ product_groups
75
+ ]
76
+ end
77
+
78
+ # An array for nullable fields
79
+ def self.nullables
80
+ []
81
+ end
82
+
83
+ def initialize(id = SKIP,
84
+ code = SKIP,
85
+ name = SKIP,
86
+ is_visible = SKIP,
87
+ product_groups = SKIP)
88
+ @id = id unless id == SKIP
89
+ @code = code unless code == SKIP
90
+ @name = name unless name == SKIP
91
+ @is_visible = is_visible unless is_visible == SKIP
92
+ @product_groups = product_groups unless product_groups == SKIP
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
+ id = hash.key?('Id') ? hash['Id'] : SKIP
101
+ code = hash.key?('Code') ? hash['Code'] : SKIP
102
+ name = hash.key?('Name') ? hash['Name'] : SKIP
103
+ is_visible = hash.key?('IsVisible') ? hash['IsVisible'] : SKIP
104
+ product_groups = hash.key?('ProductGroups') ? hash['ProductGroups'] : SKIP
105
+
106
+ # Create object from extracted values.
107
+ PurchaseCategories.new(id,
108
+ code,
109
+ name,
110
+ is_visible,
111
+ product_groups)
112
+ end
113
+ end
114
+ end
@@ -0,0 +1,217 @@
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
+ # RecentTransactionReq Model.
8
+ class RecentTransactionReq < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Three character Collecting Company Code (Shell Code) of the selected payer
13
+ # @return [Integer]
14
+ attr_accessor :col_co_code
15
+
16
+ # Unique Identifier for the customer at payment point.
17
+ # @return [String]
18
+ attr_accessor :payer_number
19
+
20
+ # Customer account number.
21
+ # @return [String]
22
+ attr_accessor :account_number
23
+
24
+ # Global product code
25
+ # @return [String]
26
+ attr_accessor :product_code
27
+
28
+ # Delco country
29
+ # @return [String]
30
+ attr_accessor :purchased_in_country
31
+
32
+ # Card identifier number masked
33
+ # @return [String]
34
+ attr_accessor :card_pan
35
+
36
+ # Start date and time of transactions
37
+ # @return [String]
38
+ attr_accessor :from_date_time
39
+
40
+ # End date and time of transactions. Mandatory if FromDateTime is provided.
41
+ # @return [String]
42
+ attr_accessor :to_date_time
43
+
44
+ # Status of transaction. DO NOT pass the value if includeDeclines is passed
45
+ # @return [String]
46
+ attr_accessor :transaction_status
47
+
48
+ # When passed as ‘true’ Only returned records with Fuel transactions.(All
49
+ # Fuels).When passed as ‘false’ the above condition will not be checked.
50
+ # (Both All Fuels and Non-Fuel)
51
+ # @return [String]
52
+ attr_accessor :fuel_only
53
+
54
+ # Product group name
55
+ # @return [String]
56
+ attr_accessor :product_group_name
57
+
58
+ # Vehicle registration number embossed on the card
59
+ # @return [String]
60
+ attr_accessor :vehicle_registration_number
61
+
62
+ # Flag to enable to get declined records
63
+ # @return [TrueClass | FalseClass]
64
+ attr_accessor :include_declines
65
+
66
+ # Card issuer name
67
+ # @return [String]
68
+ attr_accessor :card_issuer_name
69
+
70
+ # Column list to be part of response, it can be 'All' to return all possible
71
+ # column. E.g. 'All'
72
+ # To get specific columns pass multiple columns name separated by comma
73
+ # along with 'PayerNumber'. E.g. "PayerNumber,ProductCode"
74
+ # @return [String]
75
+ attr_accessor :column_list
76
+
77
+ # A mapping from model property names to API property names.
78
+ def self.names
79
+ @_hash = {} if @_hash.nil?
80
+ @_hash['col_co_code'] = 'ColCoCode'
81
+ @_hash['payer_number'] = 'PayerNumber'
82
+ @_hash['account_number'] = 'AccountNumber'
83
+ @_hash['product_code'] = 'ProductCode'
84
+ @_hash['purchased_in_country'] = 'PurchasedInCountry'
85
+ @_hash['card_pan'] = 'CardPAN'
86
+ @_hash['from_date_time'] = 'FromDateTime'
87
+ @_hash['to_date_time'] = 'ToDateTime'
88
+ @_hash['transaction_status'] = 'TransactionStatus'
89
+ @_hash['fuel_only'] = 'FuelOnly'
90
+ @_hash['product_group_name'] = 'ProductGroupName'
91
+ @_hash['vehicle_registration_number'] = 'VehicleRegistrationNumber'
92
+ @_hash['include_declines'] = 'IncludeDeclines'
93
+ @_hash['card_issuer_name'] = 'CardIssuerName'
94
+ @_hash['column_list'] = 'ColumnList'
95
+ @_hash
96
+ end
97
+
98
+ # An array for optional fields
99
+ def self.optionals
100
+ %w[
101
+ account_number
102
+ product_code
103
+ purchased_in_country
104
+ card_pan
105
+ from_date_time
106
+ to_date_time
107
+ transaction_status
108
+ fuel_only
109
+ product_group_name
110
+ vehicle_registration_number
111
+ include_declines
112
+ card_issuer_name
113
+ column_list
114
+ ]
115
+ end
116
+
117
+ # An array for nullable fields
118
+ def self.nullables
119
+ %w[
120
+ col_co_code
121
+ payer_number
122
+ account_number
123
+ product_code
124
+ purchased_in_country
125
+ card_pan
126
+ from_date_time
127
+ to_date_time
128
+ transaction_status
129
+ fuel_only
130
+ product_group_name
131
+ vehicle_registration_number
132
+ include_declines
133
+ card_issuer_name
134
+ ]
135
+ end
136
+
137
+ def initialize(col_co_code = nil,
138
+ payer_number = nil,
139
+ account_number = SKIP,
140
+ product_code = SKIP,
141
+ purchased_in_country = SKIP,
142
+ card_pan = SKIP,
143
+ from_date_time = SKIP,
144
+ to_date_time = SKIP,
145
+ transaction_status = SKIP,
146
+ fuel_only = SKIP,
147
+ product_group_name = SKIP,
148
+ vehicle_registration_number = SKIP,
149
+ include_declines = SKIP,
150
+ card_issuer_name = SKIP,
151
+ column_list = SKIP)
152
+ @col_co_code = col_co_code
153
+ @payer_number = payer_number
154
+ @account_number = account_number unless account_number == SKIP
155
+ @product_code = product_code unless product_code == SKIP
156
+ @purchased_in_country = purchased_in_country unless purchased_in_country == SKIP
157
+ @card_pan = card_pan unless card_pan == SKIP
158
+ @from_date_time = from_date_time unless from_date_time == SKIP
159
+ @to_date_time = to_date_time unless to_date_time == SKIP
160
+ @transaction_status = transaction_status unless transaction_status == SKIP
161
+ @fuel_only = fuel_only unless fuel_only == SKIP
162
+ @product_group_name = product_group_name unless product_group_name == SKIP
163
+ unless vehicle_registration_number == SKIP
164
+ @vehicle_registration_number =
165
+ vehicle_registration_number
166
+ end
167
+ @include_declines = include_declines unless include_declines == SKIP
168
+ @card_issuer_name = card_issuer_name unless card_issuer_name == SKIP
169
+ @column_list = column_list unless column_list == SKIP
170
+ end
171
+
172
+ # Creates an instance of the object from a hash.
173
+ def self.from_hash(hash)
174
+ return nil unless hash
175
+
176
+ # Extract variables from the hash.
177
+ col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : nil
178
+ payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : nil
179
+ account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
180
+ product_code = hash.key?('ProductCode') ? hash['ProductCode'] : SKIP
181
+ purchased_in_country =
182
+ hash.key?('PurchasedInCountry') ? hash['PurchasedInCountry'] : SKIP
183
+ card_pan = hash.key?('CardPAN') ? hash['CardPAN'] : SKIP
184
+ from_date_time = hash.key?('FromDateTime') ? hash['FromDateTime'] : SKIP
185
+ to_date_time = hash.key?('ToDateTime') ? hash['ToDateTime'] : SKIP
186
+ transaction_status =
187
+ hash.key?('TransactionStatus') ? hash['TransactionStatus'] : SKIP
188
+ fuel_only = hash.key?('FuelOnly') ? hash['FuelOnly'] : SKIP
189
+ product_group_name =
190
+ hash.key?('ProductGroupName') ? hash['ProductGroupName'] : SKIP
191
+ vehicle_registration_number =
192
+ hash.key?('VehicleRegistrationNumber') ? hash['VehicleRegistrationNumber'] : SKIP
193
+ include_declines =
194
+ hash.key?('IncludeDeclines') ? hash['IncludeDeclines'] : SKIP
195
+ card_issuer_name =
196
+ hash.key?('CardIssuerName') ? hash['CardIssuerName'] : SKIP
197
+ column_list = hash.key?('ColumnList') ? hash['ColumnList'] : SKIP
198
+
199
+ # Create object from extracted values.
200
+ RecentTransactionReq.new(col_co_code,
201
+ payer_number,
202
+ account_number,
203
+ product_code,
204
+ purchased_in_country,
205
+ card_pan,
206
+ from_date_time,
207
+ to_date_time,
208
+ transaction_status,
209
+ fuel_only,
210
+ product_group_name,
211
+ vehicle_registration_number,
212
+ include_declines,
213
+ card_issuer_name,
214
+ column_list)
215
+ end
216
+ end
217
+ end