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,485 @@
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 endpoint allows querying the transaction data (i.e. Priced, Billed and
8
+ # Unbilled sales items) from SFSBI. It provides a flexible search criteria and
9
+ # supports paging
10
+ class PricedRequestData < BaseModel
11
+ SKIP = Object.new
12
+ private_constant :SKIP
13
+
14
+ # Collecting Company Code (Shell Code) of the selected payer.
15
+ # @return [String]
16
+ attr_accessor :col_co_code
17
+
18
+ # Invoice status of the transactions. Mandatory Possible options:I -
19
+ # Invoiced, U – Un-Invoiced, A – All
20
+ # @return [PricedTransactionReqV2InvoiceStatusEnum]
21
+ attr_accessor :invoice_status
22
+
23
+ # Payer Number of the selected payer.
24
+ # @return [String]
25
+ attr_accessor :payer_number
26
+
27
+ # Account Id (GFN customer id)
28
+ # @return [Integer]
29
+ attr_accessor :account_id
30
+
31
+ # Account Number of the selected account.
32
+ # @return [String]
33
+ attr_accessor :account_number
34
+
35
+ # Driver Name (of Card record)
36
+ # @return [String]
37
+ attr_accessor :driver_name
38
+
39
+ # Card Group Id in GFN
40
+ # @return [Integer]
41
+ attr_accessor :card_group_id
42
+
43
+ # Full Card PAN
44
+ # @return [String]
45
+ attr_accessor :card_pan
46
+
47
+ # Product Code – Global as per GFN configuration
48
+ # @return [String]
49
+ attr_accessor :product_code
50
+
51
+ # Product Name – Global as per GFN configuration
52
+ # @return [String]
53
+ attr_accessor :product_name
54
+
55
+ # Site Code in GFN
56
+ # @return [String]
57
+ attr_accessor :site_code
58
+
59
+ # Site Code as configured in GFN
60
+ # @return [String]
61
+ attr_accessor :incoming_site_number
62
+
63
+ # Returns the billed transaction for the given invoice date
64
+ # @return [String]
65
+ attr_accessor :invoice_date
66
+
67
+ # Returns the billed transaction for the given invoice number
68
+ # @return [String]
69
+ attr_accessor :invoice_number
70
+
71
+ # Purchased InCountryCode
72
+ # @return [String]
73
+ attr_accessor :purchased_in_country_code
74
+
75
+ # Network Delco PurchasedCountryName
76
+ # @return [String]
77
+ attr_accessor :purchased_in_country
78
+
79
+ # Site Group Id in GFN
80
+ # @return [Integer]
81
+ attr_accessor :site_group_id
82
+
83
+ # Vehicle Registration (of Card record)
84
+ # @return [String]
85
+ attr_accessor :vehicle_registration_number
86
+
87
+ # Card Id (i.e. Unique Card Id in GFN)
88
+ # @return [Integer]
89
+ attr_accessor :fee_type_id
90
+
91
+ # Item identifier in the transaction.
92
+ # @return [String]
93
+ attr_accessor :line_item_description
94
+
95
+ # This entity accepts the list of CardId to filter in the response.
96
+ # Note: The number of cardId allowed to be passed in the request is
97
+ # configurable to a maximum of 500 cards.
98
+ # @return [Array[Integer]]
99
+ attr_accessor :cards
100
+
101
+ # Allowed Sorting Options
102
+ # 1. TransactionDateAscending
103
+ # 2. TransactionDateDescending
104
+ # 3. GrossAmountDescending
105
+ # 4. GrossAmountAscending
106
+ # 5. NetAmountAscending
107
+ # 6. NetAmountDescensding
108
+ # @return [PricedTransactionReqV2SortOrderEnum]
109
+ attr_accessor :sort_order
110
+
111
+ # From transaction delivery date
112
+ # @return [String]
113
+ attr_accessor :from_date
114
+
115
+ # To transaction delivery date
116
+ # @return [String]
117
+ attr_accessor :to_date
118
+
119
+ # Pass below one of the value as per the required transaction period
120
+ # 1. Last 7 Days
121
+ # 2. Last 30 Days
122
+ # 3. Last 90 Days
123
+ # @return [PricedTransactionReqV2PeriodEnum]
124
+ attr_accessor :period
125
+
126
+ # Transaction posting start date and time
127
+ # @return [String]
128
+ attr_accessor :posting_date_from
129
+
130
+ # Transaction posting end date and time
131
+ # @return [String]
132
+ attr_accessor :posting_date_to
133
+
134
+ # Unique id of the transaction that may include one or more salesitems
135
+ # @return [String]
136
+ attr_accessor :transaction_item_id
137
+
138
+ # Is FuelOnly indicator
139
+ # @return [TrueClass | FalseClass]
140
+ attr_accessor :fuel_only
141
+
142
+ # When passed as ‘true’ then all sales items along with fees will be
143
+ # included in the response and the follwoing filteres will be ignored
144
+ # * InvoiceNumber
145
+ # * InvoiceDate
146
+ # * PostingDateFrom
147
+ # * PostingDateTo
148
+ # @return [TrueClass | FalseClass]
149
+ attr_accessor :include_fees
150
+
151
+ # If true then returns all the data linked tothe payer group of the provided
152
+ # PayerNumberin the request
153
+ # @return [TrueClass | FalseClass]
154
+ attr_accessor :is_multipayer
155
+
156
+ # When passed as ‘True’ the transactions records with report date not equal
157
+ # to 9999-12-30 will be returned. When passed as ‘False’ the above condition
158
+ # will not be checked.
159
+ # @return [TrueClass | FalseClass]
160
+ attr_accessor :valid_invoice_date_only
161
+
162
+ # Invoice From Date, this is a search criterion to filter invoiced
163
+ # transactions with invoice date from this date.
164
+ # @return [String]
165
+ attr_accessor :invoice_from_date
166
+
167
+ # Invoice To Date, this is a search criterion to filter invoiced
168
+ # transactions with invoice date until this date.
169
+ # @return [String]
170
+ attr_accessor :invoice_to_date
171
+
172
+ # Hosting Collecting Company Number of the selected payer.
173
+ # @return [String]
174
+ attr_accessor :hosting_collecting_company_number
175
+
176
+ # Search based on DriverName or VRN
177
+ # @return [String]
178
+ attr_accessor :search
179
+
180
+ # Unique id of the transaction that may include one or more salesitems
181
+ # @return [String]
182
+ attr_accessor :transaction_id
183
+
184
+ # A mapping from model property names to API property names.
185
+ def self.names
186
+ @_hash = {} if @_hash.nil?
187
+ @_hash['col_co_code'] = 'ColCoCode'
188
+ @_hash['invoice_status'] = 'InvoiceStatus'
189
+ @_hash['payer_number'] = 'PayerNumber'
190
+ @_hash['account_id'] = 'AccountId'
191
+ @_hash['account_number'] = 'AccountNumber'
192
+ @_hash['driver_name'] = 'DriverName'
193
+ @_hash['card_group_id'] = 'CardGroupId'
194
+ @_hash['card_pan'] = 'CardPAN'
195
+ @_hash['product_code'] = 'ProductCode'
196
+ @_hash['product_name'] = 'ProductName'
197
+ @_hash['site_code'] = 'SiteCode'
198
+ @_hash['incoming_site_number'] = 'IncomingSiteNumber'
199
+ @_hash['invoice_date'] = 'InvoiceDate'
200
+ @_hash['invoice_number'] = 'InvoiceNumber'
201
+ @_hash['purchased_in_country_code'] = 'PurchasedInCountryCode'
202
+ @_hash['purchased_in_country'] = 'PurchasedInCountry'
203
+ @_hash['site_group_id'] = 'SiteGroupId'
204
+ @_hash['vehicle_registration_number'] = 'VehicleRegistrationNumber'
205
+ @_hash['fee_type_id'] = 'FeeTypeId'
206
+ @_hash['line_item_description'] = 'LineItemDescription'
207
+ @_hash['cards'] = 'Cards'
208
+ @_hash['sort_order'] = 'SortOrder'
209
+ @_hash['from_date'] = 'FromDate'
210
+ @_hash['to_date'] = 'ToDate'
211
+ @_hash['period'] = 'Period'
212
+ @_hash['posting_date_from'] = 'PostingDateFrom'
213
+ @_hash['posting_date_to'] = 'PostingDateTo'
214
+ @_hash['transaction_item_id'] = 'TransactionItemId'
215
+ @_hash['fuel_only'] = 'FuelOnly'
216
+ @_hash['include_fees'] = 'IncludeFees'
217
+ @_hash['is_multipayer'] = 'IsMultipayer'
218
+ @_hash['valid_invoice_date_only'] = 'ValidInvoiceDateOnly'
219
+ @_hash['invoice_from_date'] = 'InvoiceFromDate'
220
+ @_hash['invoice_to_date'] = 'InvoiceToDate'
221
+ @_hash['hosting_collecting_company_number'] =
222
+ 'HostingCollectingCompanyNumber'
223
+ @_hash['search'] = 'Search'
224
+ @_hash['transaction_id'] = 'TransactionId'
225
+ @_hash
226
+ end
227
+
228
+ # An array for optional fields
229
+ def self.optionals
230
+ %w[
231
+ account_id
232
+ account_number
233
+ driver_name
234
+ card_group_id
235
+ card_pan
236
+ product_code
237
+ product_name
238
+ site_code
239
+ incoming_site_number
240
+ invoice_date
241
+ invoice_number
242
+ purchased_in_country_code
243
+ purchased_in_country
244
+ site_group_id
245
+ vehicle_registration_number
246
+ fee_type_id
247
+ line_item_description
248
+ cards
249
+ sort_order
250
+ from_date
251
+ to_date
252
+ period
253
+ posting_date_from
254
+ posting_date_to
255
+ transaction_item_id
256
+ fuel_only
257
+ include_fees
258
+ is_multipayer
259
+ valid_invoice_date_only
260
+ invoice_from_date
261
+ invoice_to_date
262
+ hosting_collecting_company_number
263
+ search
264
+ transaction_id
265
+ ]
266
+ end
267
+
268
+ # An array for nullable fields
269
+ def self.nullables
270
+ %w[
271
+ col_co_code
272
+ invoice_status
273
+ payer_number
274
+ account_id
275
+ account_number
276
+ driver_name
277
+ card_group_id
278
+ card_pan
279
+ product_code
280
+ product_name
281
+ site_code
282
+ incoming_site_number
283
+ invoice_date
284
+ invoice_number
285
+ purchased_in_country_code
286
+ purchased_in_country
287
+ site_group_id
288
+ vehicle_registration_number
289
+ fee_type_id
290
+ line_item_description
291
+ from_date
292
+ to_date
293
+ posting_date_from
294
+ posting_date_to
295
+ transaction_item_id
296
+ fuel_only
297
+ include_fees
298
+ invoice_from_date
299
+ invoice_to_date
300
+ hosting_collecting_company_number
301
+ search
302
+ transaction_id
303
+ ]
304
+ end
305
+
306
+ def initialize(col_co_code = nil,
307
+ invoice_status = nil,
308
+ payer_number = nil,
309
+ account_id = SKIP,
310
+ account_number = SKIP,
311
+ driver_name = SKIP,
312
+ card_group_id = SKIP,
313
+ card_pan = SKIP,
314
+ product_code = SKIP,
315
+ product_name = SKIP,
316
+ site_code = SKIP,
317
+ incoming_site_number = SKIP,
318
+ invoice_date = SKIP,
319
+ invoice_number = SKIP,
320
+ purchased_in_country_code = SKIP,
321
+ purchased_in_country = SKIP,
322
+ site_group_id = SKIP,
323
+ vehicle_registration_number = SKIP,
324
+ fee_type_id = SKIP,
325
+ line_item_description = SKIP,
326
+ cards = SKIP,
327
+ sort_order = SKIP,
328
+ from_date = SKIP,
329
+ to_date = SKIP,
330
+ period = SKIP,
331
+ posting_date_from = SKIP,
332
+ posting_date_to = SKIP,
333
+ transaction_item_id = SKIP,
334
+ fuel_only = false,
335
+ include_fees = SKIP,
336
+ is_multipayer = SKIP,
337
+ valid_invoice_date_only = false,
338
+ invoice_from_date = SKIP,
339
+ invoice_to_date = SKIP,
340
+ hosting_collecting_company_number = SKIP,
341
+ search = SKIP,
342
+ transaction_id = SKIP)
343
+ @col_co_code = col_co_code
344
+ @invoice_status = invoice_status
345
+ @payer_number = payer_number
346
+ @account_id = account_id unless account_id == SKIP
347
+ @account_number = account_number unless account_number == SKIP
348
+ @driver_name = driver_name unless driver_name == SKIP
349
+ @card_group_id = card_group_id unless card_group_id == SKIP
350
+ @card_pan = card_pan unless card_pan == SKIP
351
+ @product_code = product_code unless product_code == SKIP
352
+ @product_name = product_name unless product_name == SKIP
353
+ @site_code = site_code unless site_code == SKIP
354
+ @incoming_site_number = incoming_site_number unless incoming_site_number == SKIP
355
+ @invoice_date = invoice_date unless invoice_date == SKIP
356
+ @invoice_number = invoice_number unless invoice_number == SKIP
357
+ unless purchased_in_country_code == SKIP
358
+ @purchased_in_country_code =
359
+ purchased_in_country_code
360
+ end
361
+ @purchased_in_country = purchased_in_country unless purchased_in_country == SKIP
362
+ @site_group_id = site_group_id unless site_group_id == SKIP
363
+ unless vehicle_registration_number == SKIP
364
+ @vehicle_registration_number =
365
+ vehicle_registration_number
366
+ end
367
+ @fee_type_id = fee_type_id unless fee_type_id == SKIP
368
+ @line_item_description = line_item_description unless line_item_description == SKIP
369
+ @cards = cards unless cards == SKIP
370
+ @sort_order = sort_order unless sort_order == SKIP
371
+ @from_date = from_date unless from_date == SKIP
372
+ @to_date = to_date unless to_date == SKIP
373
+ @period = period unless period == SKIP
374
+ @posting_date_from = posting_date_from unless posting_date_from == SKIP
375
+ @posting_date_to = posting_date_to unless posting_date_to == SKIP
376
+ @transaction_item_id = transaction_item_id unless transaction_item_id == SKIP
377
+ @fuel_only = fuel_only unless fuel_only == SKIP
378
+ @include_fees = include_fees unless include_fees == SKIP
379
+ @is_multipayer = is_multipayer unless is_multipayer == SKIP
380
+ @valid_invoice_date_only = valid_invoice_date_only unless valid_invoice_date_only == SKIP
381
+ @invoice_from_date = invoice_from_date unless invoice_from_date == SKIP
382
+ @invoice_to_date = invoice_to_date unless invoice_to_date == SKIP
383
+ unless hosting_collecting_company_number == SKIP
384
+ @hosting_collecting_company_number =
385
+ hosting_collecting_company_number
386
+ end
387
+ @search = search unless search == SKIP
388
+ @transaction_id = transaction_id unless transaction_id == SKIP
389
+ end
390
+
391
+ # Creates an instance of the object from a hash.
392
+ def self.from_hash(hash)
393
+ return nil unless hash
394
+
395
+ # Extract variables from the hash.
396
+ col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : nil
397
+ invoice_status = hash.key?('InvoiceStatus') ? hash['InvoiceStatus'] : nil
398
+ payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : nil
399
+ account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP
400
+ account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
401
+ driver_name = hash.key?('DriverName') ? hash['DriverName'] : SKIP
402
+ card_group_id = hash.key?('CardGroupId') ? hash['CardGroupId'] : SKIP
403
+ card_pan = hash.key?('CardPAN') ? hash['CardPAN'] : SKIP
404
+ product_code = hash.key?('ProductCode') ? hash['ProductCode'] : SKIP
405
+ product_name = hash.key?('ProductName') ? hash['ProductName'] : SKIP
406
+ site_code = hash.key?('SiteCode') ? hash['SiteCode'] : SKIP
407
+ incoming_site_number =
408
+ hash.key?('IncomingSiteNumber') ? hash['IncomingSiteNumber'] : SKIP
409
+ invoice_date = hash.key?('InvoiceDate') ? hash['InvoiceDate'] : SKIP
410
+ invoice_number = hash.key?('InvoiceNumber') ? hash['InvoiceNumber'] : SKIP
411
+ purchased_in_country_code =
412
+ hash.key?('PurchasedInCountryCode') ? hash['PurchasedInCountryCode'] : SKIP
413
+ purchased_in_country =
414
+ hash.key?('PurchasedInCountry') ? hash['PurchasedInCountry'] : SKIP
415
+ site_group_id = hash.key?('SiteGroupId') ? hash['SiteGroupId'] : SKIP
416
+ vehicle_registration_number =
417
+ hash.key?('VehicleRegistrationNumber') ? hash['VehicleRegistrationNumber'] : SKIP
418
+ fee_type_id = hash.key?('FeeTypeId') ? hash['FeeTypeId'] : SKIP
419
+ line_item_description =
420
+ hash.key?('LineItemDescription') ? hash['LineItemDescription'] : SKIP
421
+ cards = hash.key?('Cards') ? hash['Cards'] : SKIP
422
+ sort_order = hash.key?('SortOrder') ? hash['SortOrder'] : SKIP
423
+ from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
424
+ to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP
425
+ period = hash.key?('Period') ? hash['Period'] : SKIP
426
+ posting_date_from =
427
+ hash.key?('PostingDateFrom') ? hash['PostingDateFrom'] : SKIP
428
+ posting_date_to =
429
+ hash.key?('PostingDateTo') ? hash['PostingDateTo'] : SKIP
430
+ transaction_item_id =
431
+ hash.key?('TransactionItemId') ? hash['TransactionItemId'] : SKIP
432
+ fuel_only = hash['FuelOnly'] ||= false
433
+ include_fees = hash.key?('IncludeFees') ? hash['IncludeFees'] : SKIP
434
+ is_multipayer = hash.key?('IsMultipayer') ? hash['IsMultipayer'] : SKIP
435
+ valid_invoice_date_only = hash['ValidInvoiceDateOnly'] ||= false
436
+ invoice_from_date =
437
+ hash.key?('InvoiceFromDate') ? hash['InvoiceFromDate'] : SKIP
438
+ invoice_to_date =
439
+ hash.key?('InvoiceToDate') ? hash['InvoiceToDate'] : SKIP
440
+ hosting_collecting_company_number =
441
+ hash.key?('HostingCollectingCompanyNumber') ? hash['HostingCollectingCompanyNumber'] : SKIP
442
+ search = hash.key?('Search') ? hash['Search'] : SKIP
443
+ transaction_id = hash.key?('TransactionId') ? hash['TransactionId'] : SKIP
444
+
445
+ # Create object from extracted values.
446
+ PricedRequestData.new(col_co_code,
447
+ invoice_status,
448
+ payer_number,
449
+ account_id,
450
+ account_number,
451
+ driver_name,
452
+ card_group_id,
453
+ card_pan,
454
+ product_code,
455
+ product_name,
456
+ site_code,
457
+ incoming_site_number,
458
+ invoice_date,
459
+ invoice_number,
460
+ purchased_in_country_code,
461
+ purchased_in_country,
462
+ site_group_id,
463
+ vehicle_registration_number,
464
+ fee_type_id,
465
+ line_item_description,
466
+ cards,
467
+ sort_order,
468
+ from_date,
469
+ to_date,
470
+ period,
471
+ posting_date_from,
472
+ posting_date_to,
473
+ transaction_item_id,
474
+ fuel_only,
475
+ include_fees,
476
+ is_multipayer,
477
+ valid_invoice_date_only,
478
+ invoice_from_date,
479
+ invoice_to_date,
480
+ hosting_collecting_company_number,
481
+ search,
482
+ transaction_id)
483
+ end
484
+ end
485
+ end