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,124 @@
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
+ # FeesFeeRuleTiers Model.
8
+ class FeesFeeRuleTiers < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Integer]
14
+ attr_accessor :tier_min
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Integer]
18
+ attr_accessor :tier_max
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :date_effective
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [String]
26
+ attr_accessor :date_terminated
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [Float]
30
+ attr_accessor :tier_value
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [Integer]
34
+ attr_accessor :fee_rule_basis_id
35
+
36
+ # TODO: Write general description for this method
37
+ # @return [String]
38
+ attr_accessor :fee_rule_basis_description
39
+
40
+ # A mapping from model property names to API property names.
41
+ def self.names
42
+ @_hash = {} if @_hash.nil?
43
+ @_hash['tier_min'] = 'TierMin'
44
+ @_hash['tier_max'] = 'TierMax'
45
+ @_hash['date_effective'] = 'DateEffective'
46
+ @_hash['date_terminated'] = 'DateTerminated'
47
+ @_hash['tier_value'] = 'TierValue'
48
+ @_hash['fee_rule_basis_id'] = 'FeeRuleBasisID'
49
+ @_hash['fee_rule_basis_description'] = 'FeeRuleBasisDescription'
50
+ @_hash
51
+ end
52
+
53
+ # An array for optional fields
54
+ def self.optionals
55
+ %w[
56
+ tier_min
57
+ tier_max
58
+ date_effective
59
+ date_terminated
60
+ tier_value
61
+ fee_rule_basis_id
62
+ fee_rule_basis_description
63
+ ]
64
+ end
65
+
66
+ # An array for nullable fields
67
+ def self.nullables
68
+ %w[
69
+ tier_min
70
+ tier_max
71
+ date_effective
72
+ date_terminated
73
+ tier_value
74
+ fee_rule_basis_id
75
+ fee_rule_basis_description
76
+ ]
77
+ end
78
+
79
+ def initialize(tier_min = SKIP,
80
+ tier_max = SKIP,
81
+ date_effective = SKIP,
82
+ date_terminated = SKIP,
83
+ tier_value = SKIP,
84
+ fee_rule_basis_id = SKIP,
85
+ fee_rule_basis_description = SKIP)
86
+ @tier_min = tier_min unless tier_min == SKIP
87
+ @tier_max = tier_max unless tier_max == SKIP
88
+ @date_effective = date_effective unless date_effective == SKIP
89
+ @date_terminated = date_terminated unless date_terminated == SKIP
90
+ @tier_value = tier_value unless tier_value == SKIP
91
+ @fee_rule_basis_id = fee_rule_basis_id unless fee_rule_basis_id == SKIP
92
+ unless fee_rule_basis_description == SKIP
93
+ @fee_rule_basis_description =
94
+ fee_rule_basis_description
95
+ end
96
+ end
97
+
98
+ # Creates an instance of the object from a hash.
99
+ def self.from_hash(hash)
100
+ return nil unless hash
101
+
102
+ # Extract variables from the hash.
103
+ tier_min = hash.key?('TierMin') ? hash['TierMin'] : SKIP
104
+ tier_max = hash.key?('TierMax') ? hash['TierMax'] : SKIP
105
+ date_effective = hash.key?('DateEffective') ? hash['DateEffective'] : SKIP
106
+ date_terminated =
107
+ hash.key?('DateTerminated') ? hash['DateTerminated'] : SKIP
108
+ tier_value = hash.key?('TierValue') ? hash['TierValue'] : SKIP
109
+ fee_rule_basis_id =
110
+ hash.key?('FeeRuleBasisID') ? hash['FeeRuleBasisID'] : SKIP
111
+ fee_rule_basis_description =
112
+ hash.key?('FeeRuleBasisDescription') ? hash['FeeRuleBasisDescription'] : SKIP
113
+
114
+ # Create object from extracted values.
115
+ FeesFeeRuleTiers.new(tier_min,
116
+ tier_max,
117
+ date_effective,
118
+ date_terminated,
119
+ tier_value,
120
+ fee_rule_basis_id,
121
+ fee_rule_basis_description)
122
+ end
123
+ end
124
+ end
@@ -0,0 +1,98 @@
1
+ # shell_data_reporting_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellDataReportingApIs
7
+ # This entity will not be present in the response if the
8
+ # ‘IncludeFinanceCurrency’ flag in the request is ‘false’
9
+ class FinanceCurrency < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Currency ISO Code used for the Finance Widget.
14
+ # @return [String]
15
+ attr_accessor :currency_code
16
+
17
+ # Currency Symbol
18
+ # @return [String]
19
+ attr_accessor :currency_symbol
20
+
21
+ # Factor to be used for converting the amounts in invoice currency to
22
+ # finance widget currency. (If finance currency is same as invoice currency,
23
+ # then the value of this field will be “1” so that the value does not
24
+ # change)
25
+ # @return [Float]
26
+ attr_accessor :invoice_exchange_rate
27
+
28
+ # Factor to be used for converting the amounts in credit limit currency to
29
+ # finance widget currency. (If finance currency is same as credit limit
30
+ # currency, then the value of this field will be “1” so that the value does
31
+ # not change)
32
+ # @return [Float]
33
+ attr_accessor :credit_limit_exchange_rate
34
+
35
+ # A mapping from model property names to API property names.
36
+ def self.names
37
+ @_hash = {} if @_hash.nil?
38
+ @_hash['currency_code'] = 'CurrencyCode'
39
+ @_hash['currency_symbol'] = 'CurrencySymbol'
40
+ @_hash['invoice_exchange_rate'] = 'Invoice_ExchangeRate'
41
+ @_hash['credit_limit_exchange_rate'] = 'CreditLimit_ExchangeRate'
42
+ @_hash
43
+ end
44
+
45
+ # An array for optional fields
46
+ def self.optionals
47
+ %w[
48
+ currency_code
49
+ currency_symbol
50
+ invoice_exchange_rate
51
+ credit_limit_exchange_rate
52
+ ]
53
+ end
54
+
55
+ # An array for nullable fields
56
+ def self.nullables
57
+ %w[
58
+ currency_code
59
+ currency_symbol
60
+ invoice_exchange_rate
61
+ credit_limit_exchange_rate
62
+ ]
63
+ end
64
+
65
+ def initialize(currency_code = SKIP,
66
+ currency_symbol = SKIP,
67
+ invoice_exchange_rate = SKIP,
68
+ credit_limit_exchange_rate = SKIP)
69
+ @currency_code = currency_code unless currency_code == SKIP
70
+ @currency_symbol = currency_symbol unless currency_symbol == SKIP
71
+ @invoice_exchange_rate = invoice_exchange_rate unless invoice_exchange_rate == SKIP
72
+ unless credit_limit_exchange_rate == SKIP
73
+ @credit_limit_exchange_rate =
74
+ credit_limit_exchange_rate
75
+ end
76
+ end
77
+
78
+ # Creates an instance of the object from a hash.
79
+ def self.from_hash(hash)
80
+ return nil unless hash
81
+
82
+ # Extract variables from the hash.
83
+ currency_code = hash.key?('CurrencyCode') ? hash['CurrencyCode'] : SKIP
84
+ currency_symbol =
85
+ hash.key?('CurrencySymbol') ? hash['CurrencySymbol'] : SKIP
86
+ invoice_exchange_rate =
87
+ hash.key?('Invoice_ExchangeRate') ? hash['Invoice_ExchangeRate'] : SKIP
88
+ credit_limit_exchange_rate =
89
+ hash.key?('CreditLimit_ExchangeRate') ? hash['CreditLimit_ExchangeRate'] : SKIP
90
+
91
+ # Create object from extracted values.
92
+ FinanceCurrency.new(currency_code,
93
+ currency_symbol,
94
+ invoice_exchange_rate,
95
+ credit_limit_exchange_rate)
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,73 @@
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
+ # FuelConsumptionCard Model.
8
+ class FuelConsumptionCard < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Card Id
13
+ # Optional, when PAN is provided else mandatory.
14
+ # @return [Integer]
15
+ attr_accessor :card_id
16
+
17
+ # Full Card PAN
18
+ # Optional, when CardId is provided else mandatory.
19
+ # @return [String]
20
+ attr_accessor :pan
21
+
22
+ # Card Expiry Date
23
+ # Format: yyyyMMdd
24
+ # @return [String]
25
+ attr_accessor :expiry_date
26
+
27
+ # A mapping from model property names to API property names.
28
+ def self.names
29
+ @_hash = {} if @_hash.nil?
30
+ @_hash['card_id'] = 'CardId'
31
+ @_hash['pan'] = 'PAN'
32
+ @_hash['expiry_date'] = 'ExpiryDate'
33
+ @_hash
34
+ end
35
+
36
+ # An array for optional fields
37
+ def self.optionals
38
+ %w[
39
+ card_id
40
+ pan
41
+ expiry_date
42
+ ]
43
+ end
44
+
45
+ # An array for nullable fields
46
+ def self.nullables
47
+ []
48
+ end
49
+
50
+ def initialize(card_id = SKIP,
51
+ pan = SKIP,
52
+ expiry_date = SKIP)
53
+ @card_id = card_id unless card_id == SKIP
54
+ @pan = pan unless pan == SKIP
55
+ @expiry_date = expiry_date unless expiry_date == SKIP
56
+ end
57
+
58
+ # Creates an instance of the object from a hash.
59
+ def self.from_hash(hash)
60
+ return nil unless hash
61
+
62
+ # Extract variables from the hash.
63
+ card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
64
+ pan = hash.key?('PAN') ? hash['PAN'] : SKIP
65
+ expiry_date = hash.key?('ExpiryDate') ? hash['ExpiryDate'] : SKIP
66
+
67
+ # Create object from extracted values.
68
+ FuelConsumptionCard.new(card_id,
69
+ pan,
70
+ expiry_date)
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,267 @@
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
+ # FuelConsumptionData Model.
8
+ class FuelConsumptionData < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Account Name
13
+ # @return [String]
14
+ attr_accessor :account_name
15
+
16
+ # Account Number
17
+ # @return [String]
18
+ attr_accessor :account_number
19
+
20
+ # Payment customer Name
21
+ # @return [String]
22
+ attr_accessor :payer_name
23
+
24
+ # Payment customer number
25
+ # @return [String]
26
+ attr_accessor :payer_number
27
+
28
+ # Card PAN
29
+ # @return [String]
30
+ attr_accessor :card_number
31
+
32
+ # Card group ID
33
+ # @return [Integer]
34
+ attr_accessor :card_group_id
35
+
36
+ # Card group name
37
+ # @return [String]
38
+ attr_accessor :card_group_name
39
+
40
+ # Driver name
41
+ # @return [String]
42
+ attr_accessor :driver_name
43
+
44
+ # Vehicle registration number
45
+ # @return [String]
46
+ attr_accessor :license_number
47
+
48
+ # First transaction odometer reading
49
+ # @return [Float]
50
+ attr_accessor :initial_odometer
51
+
52
+ # Last transaction odometer reading
53
+ # @return [Float]
54
+ attr_accessor :last_odometer
55
+
56
+ # Distance in KM or Miles based on Customer and Colco Settings
57
+ # @return [Float]
58
+ attr_accessor :distance
59
+
60
+ # Total Fuel Consumption.
61
+ # @return [Float]
62
+ attr_accessor :fuel_consumption
63
+
64
+ # Net Fuel Amount
65
+ # @return [Float]
66
+ attr_accessor :fuel_net_amount
67
+
68
+ # Total Discount
69
+ # @return [Float]
70
+ attr_accessor :discount
71
+
72
+ # Fuel Tax Amount
73
+ # @return [Float]
74
+ attr_accessor :fuel_tax
75
+
76
+ # Total Fuel Volume in Litres
77
+ # @return [Float]
78
+ attr_accessor :fuel_volume
79
+
80
+ # Gross Nonfuel Amount
81
+ # @return [Float]
82
+ attr_accessor :gross_non_fuel_expenses
83
+
84
+ # Total Co2 produced
85
+ # @return [Float]
86
+ attr_accessor :co2_produced
87
+
88
+ # Total Transaction Count
89
+ # @return [Float]
90
+ attr_accessor :transaction_count
91
+
92
+ # A mapping from model property names to API property names.
93
+ def self.names
94
+ @_hash = {} if @_hash.nil?
95
+ @_hash['account_name'] = 'AccountName'
96
+ @_hash['account_number'] = 'AccountNumber'
97
+ @_hash['payer_name'] = 'PayerName'
98
+ @_hash['payer_number'] = 'PayerNumber'
99
+ @_hash['card_number'] = 'CardNumber'
100
+ @_hash['card_group_id'] = 'CardGroupId'
101
+ @_hash['card_group_name'] = 'CardGroupName'
102
+ @_hash['driver_name'] = 'DriverName'
103
+ @_hash['license_number'] = 'LicenseNumber'
104
+ @_hash['initial_odometer'] = 'InitialOdometer'
105
+ @_hash['last_odometer'] = 'LastOdometer'
106
+ @_hash['distance'] = 'Distance'
107
+ @_hash['fuel_consumption'] = 'FuelConsumption'
108
+ @_hash['fuel_net_amount'] = 'FuelNetAmount'
109
+ @_hash['discount'] = 'Discount'
110
+ @_hash['fuel_tax'] = 'FuelTax'
111
+ @_hash['fuel_volume'] = 'FuelVolume'
112
+ @_hash['gross_non_fuel_expenses'] = 'GrossNonFuelExpenses'
113
+ @_hash['co2_produced'] = 'CO2Produced'
114
+ @_hash['transaction_count'] = 'TransactionCount'
115
+ @_hash
116
+ end
117
+
118
+ # An array for optional fields
119
+ def self.optionals
120
+ %w[
121
+ account_name
122
+ account_number
123
+ payer_name
124
+ payer_number
125
+ card_number
126
+ card_group_id
127
+ card_group_name
128
+ driver_name
129
+ license_number
130
+ initial_odometer
131
+ last_odometer
132
+ distance
133
+ fuel_consumption
134
+ fuel_net_amount
135
+ discount
136
+ fuel_tax
137
+ fuel_volume
138
+ gross_non_fuel_expenses
139
+ co2_produced
140
+ transaction_count
141
+ ]
142
+ end
143
+
144
+ # An array for nullable fields
145
+ def self.nullables
146
+ %w[
147
+ account_name
148
+ account_number
149
+ payer_name
150
+ payer_number
151
+ card_number
152
+ card_group_id
153
+ card_group_name
154
+ driver_name
155
+ license_number
156
+ initial_odometer
157
+ last_odometer
158
+ distance
159
+ fuel_consumption
160
+ fuel_net_amount
161
+ discount
162
+ fuel_tax
163
+ fuel_volume
164
+ gross_non_fuel_expenses
165
+ co2_produced
166
+ transaction_count
167
+ ]
168
+ end
169
+
170
+ def initialize(account_name = SKIP,
171
+ account_number = SKIP,
172
+ payer_name = SKIP,
173
+ payer_number = SKIP,
174
+ card_number = SKIP,
175
+ card_group_id = SKIP,
176
+ card_group_name = SKIP,
177
+ driver_name = SKIP,
178
+ license_number = SKIP,
179
+ initial_odometer = SKIP,
180
+ last_odometer = SKIP,
181
+ distance = SKIP,
182
+ fuel_consumption = SKIP,
183
+ fuel_net_amount = SKIP,
184
+ discount = SKIP,
185
+ fuel_tax = SKIP,
186
+ fuel_volume = SKIP,
187
+ gross_non_fuel_expenses = SKIP,
188
+ co2_produced = SKIP,
189
+ transaction_count = SKIP)
190
+ @account_name = account_name unless account_name == SKIP
191
+ @account_number = account_number unless account_number == SKIP
192
+ @payer_name = payer_name unless payer_name == SKIP
193
+ @payer_number = payer_number unless payer_number == SKIP
194
+ @card_number = card_number unless card_number == SKIP
195
+ @card_group_id = card_group_id unless card_group_id == SKIP
196
+ @card_group_name = card_group_name unless card_group_name == SKIP
197
+ @driver_name = driver_name unless driver_name == SKIP
198
+ @license_number = license_number unless license_number == SKIP
199
+ @initial_odometer = initial_odometer unless initial_odometer == SKIP
200
+ @last_odometer = last_odometer unless last_odometer == SKIP
201
+ @distance = distance unless distance == SKIP
202
+ @fuel_consumption = fuel_consumption unless fuel_consumption == SKIP
203
+ @fuel_net_amount = fuel_net_amount unless fuel_net_amount == SKIP
204
+ @discount = discount unless discount == SKIP
205
+ @fuel_tax = fuel_tax unless fuel_tax == SKIP
206
+ @fuel_volume = fuel_volume unless fuel_volume == SKIP
207
+ @gross_non_fuel_expenses = gross_non_fuel_expenses unless gross_non_fuel_expenses == SKIP
208
+ @co2_produced = co2_produced unless co2_produced == SKIP
209
+ @transaction_count = transaction_count unless transaction_count == SKIP
210
+ end
211
+
212
+ # Creates an instance of the object from a hash.
213
+ def self.from_hash(hash)
214
+ return nil unless hash
215
+
216
+ # Extract variables from the hash.
217
+ account_name = hash.key?('AccountName') ? hash['AccountName'] : SKIP
218
+ account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
219
+ payer_name = hash.key?('PayerName') ? hash['PayerName'] : SKIP
220
+ payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
221
+ card_number = hash.key?('CardNumber') ? hash['CardNumber'] : SKIP
222
+ card_group_id = hash.key?('CardGroupId') ? hash['CardGroupId'] : SKIP
223
+ card_group_name =
224
+ hash.key?('CardGroupName') ? hash['CardGroupName'] : SKIP
225
+ driver_name = hash.key?('DriverName') ? hash['DriverName'] : SKIP
226
+ license_number = hash.key?('LicenseNumber') ? hash['LicenseNumber'] : SKIP
227
+ initial_odometer =
228
+ hash.key?('InitialOdometer') ? hash['InitialOdometer'] : SKIP
229
+ last_odometer = hash.key?('LastOdometer') ? hash['LastOdometer'] : SKIP
230
+ distance = hash.key?('Distance') ? hash['Distance'] : SKIP
231
+ fuel_consumption =
232
+ hash.key?('FuelConsumption') ? hash['FuelConsumption'] : SKIP
233
+ fuel_net_amount =
234
+ hash.key?('FuelNetAmount') ? hash['FuelNetAmount'] : SKIP
235
+ discount = hash.key?('Discount') ? hash['Discount'] : SKIP
236
+ fuel_tax = hash.key?('FuelTax') ? hash['FuelTax'] : SKIP
237
+ fuel_volume = hash.key?('FuelVolume') ? hash['FuelVolume'] : SKIP
238
+ gross_non_fuel_expenses =
239
+ hash.key?('GrossNonFuelExpenses') ? hash['GrossNonFuelExpenses'] : SKIP
240
+ co2_produced = hash.key?('CO2Produced') ? hash['CO2Produced'] : SKIP
241
+ transaction_count =
242
+ hash.key?('TransactionCount') ? hash['TransactionCount'] : SKIP
243
+
244
+ # Create object from extracted values.
245
+ FuelConsumptionData.new(account_name,
246
+ account_number,
247
+ payer_name,
248
+ payer_number,
249
+ card_number,
250
+ card_group_id,
251
+ card_group_name,
252
+ driver_name,
253
+ license_number,
254
+ initial_odometer,
255
+ last_odometer,
256
+ distance,
257
+ fuel_consumption,
258
+ fuel_net_amount,
259
+ discount,
260
+ fuel_tax,
261
+ fuel_volume,
262
+ gross_non_fuel_expenses,
263
+ co2_produced,
264
+ transaction_count)
265
+ end
266
+ end
267
+ end