data-and-reporting-sdk 1.0.0 → 1.2.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.
- checksums.yaml +4 -4
- data/README.md +15 -16
- data/lib/shell_data_reporting_ap_is/controllers/base_controller.rb +9 -9
- data/lib/shell_data_reporting_ap_is/controllers/customer_controller.rb +210 -210
- data/lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb +221 -221
- data/lib/shell_data_reporting_ap_is/controllers/o_auth_authorization_controller.rb +9 -9
- data/lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb +354 -354
- data/lib/shell_data_reporting_ap_is/exceptions/default_error_exception.rb +15 -15
- data/lib/shell_data_reporting_ap_is/exceptions/error_object_exception.rb +15 -15
- data/lib/shell_data_reporting_ap_is/exceptions/error_user_access_error1_exception.rb +15 -15
- data/lib/shell_data_reporting_ap_is/exceptions/o_auth_provider_exception.rb +15 -15
- data/lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb +54 -10
- data/lib/shell_data_reporting_ap_is/models/account_access.rb +3 -8
- data/lib/shell_data_reporting_ap_is/models/account_request.rb +17 -26
- data/lib/shell_data_reporting_ap_is/models/account_response.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/account_response_accounts_items.rb +29 -53
- data/lib/shell_data_reporting_ap_is/models/accounts.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/address.rb +4 -11
- data/lib/shell_data_reporting_ap_is/models/audit_request.rb +17 -25
- data/lib/shell_data_reporting_ap_is/models/audit_response.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/audit_response_audits_items.rb +50 -63
- data/lib/shell_data_reporting_ap_is/models/bank_account.rb +5 -13
- data/lib/shell_data_reporting_ap_is/models/base_model.rb +76 -28
- data/lib/shell_data_reporting_ap_is/models/bonus_configuration.rb +9 -18
- data/lib/shell_data_reporting_ap_is/models/bonus_history.rb +14 -29
- data/lib/shell_data_reporting_ap_is/models/card_day_time_restrictions.rb +3 -9
- data/lib/shell_data_reporting_ap_is/models/card_exceptions.rb +8 -19
- data/lib/shell_data_reporting_ap_is/models/card_group_request.rb +6 -12
- data/lib/shell_data_reporting_ap_is/models/card_group_response.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/card_group_response_card_groups_items.rb +10 -20
- data/lib/shell_data_reporting_ap_is/models/card_type_request.rb +3 -7
- data/lib/shell_data_reporting_ap_is/models/card_type_response.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/card_type_response_customer_card_types_items.rb +15 -31
- data/lib/shell_data_reporting_ap_is/models/card_type_response_error.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/card_usage_restrictions.rb +5 -10
- data/lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb +3 -8
- data/lib/shell_data_reporting_ap_is/models/card_usage_summary_response.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/col_co_access.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/current_volume.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/customer_contract.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/customer_detail_request.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/customer_detail_response.rb +31 -45
- data/lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb +5 -12
- data/lib/shell_data_reporting_ap_is/models/customer_price_list_response.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/default_error_fault.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/delivery_addresses.rb +7 -18
- data/lib/shell_data_reporting_ap_is/models/eid_access.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/eid_document.rb +11 -16
- data/lib/shell_data_reporting_ap_is/models/eid_document_response.rb +3 -8
- data/lib/shell_data_reporting_ap_is/models/eid_download_req.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/eid_search_req.rb +10 -15
- data/lib/shell_data_reporting_ap_is/models/eid_search_request.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/error_details.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/error_status.rb +11 -2
- data/lib/shell_data_reporting_ap_is/models/error_user_access_error.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/exception_product.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/exception_site_location.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/fee_item.rb +35 -71
- data/lib/shell_data_reporting_ap_is/models/fee_item_summary_all_of0.rb +5 -11
- data/lib/shell_data_reporting_ap_is/models/fee_rule_location.rb +4 -10
- data/lib/shell_data_reporting_ap_is/models/fee_rule_product.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/fee_rule_tier.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/fee_summary_response.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb +3 -7
- data/lib/shell_data_reporting_ap_is/models/finance_currency.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb +104 -0
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_card.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_data.rb +9 -20
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_request.rb +7 -14
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_response.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_request_filters.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_response_data.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/invoice_distribution_method.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/invoice_download_req.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/invoice_search_details.rb +86 -107
- data/lib/shell_data_reporting_ap_is/models/invoice_search_request.rb +5 -7
- data/lib/shell_data_reporting_ap_is/models/invoice_search_request_filters.rb +21 -31
- data/lib/shell_data_reporting_ap_is/models/invoice_search_response.rb +2 -7
- data/lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb +21 -31
- data/lib/shell_data_reporting_ap_is/models/invoice_summary_response.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/invoices_summaries.rb +5 -10
- data/lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb +39 -48
- data/lib/shell_data_reporting_ap_is/models/logged_in_user_request.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/logged_in_user_response.rb +12 -25
- data/lib/shell_data_reporting_ap_is/models/monthly_invoice_trend.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb +21 -32
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response_transactions_items.rb +70 -122
- data/lib/shell_data_reporting_ap_is/models/o_auth_token.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/past_statement_of_accounts.rb +11 -22
- data/lib/shell_data_reporting_ap_is/models/payer_access.rb +3 -8
- data/lib/shell_data_reporting_ap_is/models/payer_details.rb +49 -92
- data/lib/shell_data_reporting_ap_is/models/payer_request.rb +9 -12
- data/lib/shell_data_reporting_ap_is/models/payer_response.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/payers.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb +8 -17
- data/lib/shell_data_reporting_ap_is/models/pin_advice_types.rb +5 -6
- data/lib/shell_data_reporting_ap_is/models/price_list.rb +25 -45
- data/lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb +28 -44
- data/lib/shell_data_reporting_ap_is/models/price_transaction_request.rb +41 -59
- data/lib/shell_data_reporting_ap_is/models/priced_request_data.rb +20 -46
- data/lib/shell_data_reporting_ap_is/models/priced_response_data.rb +91 -201
- data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response_transactions_summary_items.rb +22 -28
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb +11 -2
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_request_v2.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_transactions_items.rb +91 -141
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_v2.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb +3 -6
- data/lib/shell_data_reporting_ap_is/models/pricing_history.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/purchase_categories.rb +1 -4
- data/lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb +6 -14
- data/lib/shell_data_reporting_ap_is/models/recent_transaction_request.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/recent_transactions.rb +29 -60
- data/lib/shell_data_reporting_ap_is/models/recent_transactions_response.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/role.rb +3 -6
- data/lib/shell_data_reporting_ap_is/models/search_doc_req.rb +19 -27
- data/lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb +9 -16
- data/lib/shell_data_reporting_ap_is/models/search_documents_request.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/search_documents_response.rb +3 -7
- data/lib/shell_data_reporting_ap_is/models/search_soa_req.rb +4 -11
- data/lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb +11 -18
- data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_request.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_response.rb +2 -7
- data/lib/shell_data_reporting_ap_is/models/site_location.rb +11 -2
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_request_filters.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_resp.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_response.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/tier.rb +8 -12
- data/lib/shell_data_reporting_ap_is/models/transaction_exceptions.rb +47 -92
- data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb +12 -21
- data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb +21 -33
- data/lib/shell_data_reporting_ap_is/models/transaction_fees_response.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/update_odometer.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/update_odometer_request.rb +3 -8
- data/lib/shell_data_reporting_ap_is/models/update_odometer_response.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/usage_summary.rb +6 -14
- data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_response.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_request.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_response.rb +2 -5
- data/lib/shell_data_reporting_ap_is/utilities/file_wrapper.rb +9 -9
- data/lib/shell_data_reporting_ap_is/utilities/union_type_lookup.rb +35 -0
- data/lib/shell_data_reporting_ap_is.rb +3 -0
- data/test/controllers/controller_test_base.rb +0 -5
- data/test/controllers/test_invoice_controller.rb +1 -1
- data/test/controllers/test_transaction_controller.rb +83 -75
- metadata +12 -16
@@ -114,23 +114,23 @@ module ShellDataReportingApIs
|
|
114
114
|
|
115
115
|
# User requested operation.
|
116
116
|
# Possible values:
|
117
|
-
# •
|
118
|
-
# •
|
119
|
-
# •
|
120
|
-
# •
|
121
|
-
# •
|
122
|
-
# •
|
123
|
-
# •
|
124
|
-
# •
|
125
|
-
# •
|
126
|
-
# •
|
127
|
-
# •
|
128
|
-
# •
|
129
|
-
# •
|
130
|
-
# •
|
131
|
-
# •
|
132
|
-
# •
|
133
|
-
# •
|
117
|
+
# • OrderCard
|
118
|
+
# • CreateCardGroup
|
119
|
+
# • PINReminder
|
120
|
+
# • MoveCard
|
121
|
+
# • UpdateCardStatus
|
122
|
+
# • UpdateCardGroup
|
123
|
+
# • AutoRenew
|
124
|
+
# • BulkCardOrder
|
125
|
+
# • BulkCardBlock
|
126
|
+
# • BulkCardOrderMultiAccount
|
127
|
+
# • MobilePaymentRegistration
|
128
|
+
# • UpdateCompanyInfo
|
129
|
+
# • BCOSummary
|
130
|
+
# • BCOMultiAccountSummary
|
131
|
+
# • BCBSummary
|
132
|
+
# • FundTransfer
|
133
|
+
# • DeliveryAddressUpdate
|
134
134
|
# @return [String]
|
135
135
|
attr_accessor :requested_operation
|
136
136
|
|
@@ -140,35 +140,35 @@ module ShellDataReportingApIs
|
|
140
140
|
|
141
141
|
# Request type initiated under the requested operation.
|
142
142
|
# Possible values:
|
143
|
-
# •
|
144
|
-
# •
|
145
|
-
# •
|
146
|
-
# •
|
147
|
-
# •
|
148
|
-
# •
|
149
|
-
# •
|
150
|
-
# •
|
151
|
-
# •
|
152
|
-
# •
|
153
|
-
# •
|
154
|
-
# •
|
155
|
-
# •
|
156
|
-
# •
|
157
|
-
# •
|
158
|
-
# •
|
159
|
-
# •
|
143
|
+
# • OrderCard
|
144
|
+
# • CreateCardGroup
|
145
|
+
# • PINReminder
|
146
|
+
# • MoveCard
|
147
|
+
# • UpdateCardStatus
|
148
|
+
# • UpdateCardGroup
|
149
|
+
# • AutoRenew
|
150
|
+
# • BulkCardOrder
|
151
|
+
# • BulkCardBlock
|
152
|
+
# • BulkCardOrderMultiAccount
|
153
|
+
# • MobilePaymentRegistration
|
154
|
+
# • UpdateCompanyInfo
|
155
|
+
# • BCOSummary
|
156
|
+
# • BCOMultiAccountSummary
|
157
|
+
# • BCBSummary
|
158
|
+
# • FundTransfer
|
159
|
+
# • DeliveryAddressUpdate
|
160
160
|
# @return [String]
|
161
161
|
attr_accessor :request_type
|
162
162
|
|
163
163
|
# Status of the request.
|
164
164
|
# Possible values:
|
165
|
-
# •
|
166
|
-
# •
|
167
|
-
# •
|
168
|
-
# •
|
169
|
-
# •
|
170
|
-
# •
|
171
|
-
# •
|
165
|
+
# • Success
|
166
|
+
# • Failed
|
167
|
+
# • InProgress
|
168
|
+
# • Submitted
|
169
|
+
# • Rejected
|
170
|
+
# • PendingApproval
|
171
|
+
# • MailedToCSC
|
172
172
|
# @return [String]
|
173
173
|
attr_accessor :status
|
174
174
|
|
@@ -297,8 +297,7 @@ module ShellDataReportingApIs
|
|
297
297
|
]
|
298
298
|
end
|
299
299
|
|
300
|
-
def initialize(account_id = SKIP,
|
301
|
-
account_number = SKIP,
|
300
|
+
def initialize(account_id = SKIP, account_number = SKIP,
|
302
301
|
additional_information1 = SKIP,
|
303
302
|
additional_information2 = SKIP,
|
304
303
|
additional_information3 = SKIP,
|
@@ -307,26 +306,14 @@ module ShellDataReportingApIs
|
|
307
306
|
additional_information6 = SKIP,
|
308
307
|
additional_information7 = SKIP,
|
309
308
|
additional_information8 = SKIP,
|
310
|
-
additional_information9 = SKIP,
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
global_request_id = SKIP,
|
319
|
-
pan = SKIP,
|
320
|
-
payer_id = SKIP,
|
321
|
-
payer_number = SKIP,
|
322
|
-
processed_on = SKIP,
|
323
|
-
requested_by = SKIP,
|
324
|
-
requested_operation = SKIP,
|
325
|
-
request_reference = SKIP,
|
326
|
-
request_type = SKIP,
|
327
|
-
status = SKIP,
|
328
|
-
submitted_on = SKIP,
|
329
|
-
sub_request_reference = SKIP,
|
309
|
+
additional_information9 = SKIP, card_group_id = SKIP,
|
310
|
+
card_group_name = SKIP, card_id = SKIP, col_co_code = SKIP,
|
311
|
+
col_co_id = SKIP, error_code = SKIP, error_string = SKIP,
|
312
|
+
global_request_id = SKIP, pan = SKIP, payer_id = SKIP,
|
313
|
+
payer_number = SKIP, processed_on = SKIP,
|
314
|
+
requested_by = SKIP, requested_operation = SKIP,
|
315
|
+
request_reference = SKIP, request_type = SKIP, status = SKIP,
|
316
|
+
submitted_on = SKIP, sub_request_reference = SKIP,
|
330
317
|
user_display_name = SKIP)
|
331
318
|
@account_id = account_id unless account_id == SKIP
|
332
319
|
@account_number = account_number unless account_number == SKIP
|
@@ -123,19 +123,11 @@ module ShellDataReportingApIs
|
|
123
123
|
]
|
124
124
|
end
|
125
125
|
|
126
|
-
def initialize(account_number = SKIP,
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
iban = SKIP,
|
132
|
-
currency_code = SKIP,
|
133
|
-
currency_symbol = SKIP,
|
134
|
-
country_iso_code = SKIP,
|
135
|
-
country = SKIP,
|
136
|
-
sort_code = SKIP,
|
137
|
-
swift_code = SKIP,
|
138
|
-
bank_type = SKIP)
|
126
|
+
def initialize(account_number = SKIP, bank_name = SKIP, account_name = SKIP,
|
127
|
+
date_effective = SKIP, date_terminated = SKIP, iban = SKIP,
|
128
|
+
currency_code = SKIP, currency_symbol = SKIP,
|
129
|
+
country_iso_code = SKIP, country = SKIP, sort_code = SKIP,
|
130
|
+
swift_code = SKIP, bank_type = SKIP)
|
139
131
|
@account_number = account_number unless account_number == SKIP
|
140
132
|
@bank_name = bank_name unless bank_name == SKIP
|
141
133
|
@account_name = account_name unless account_name == SKIP
|
@@ -5,6 +5,7 @@
|
|
5
5
|
|
6
6
|
module ShellDataReportingApIs
|
7
7
|
# Base model.
|
8
|
+
# rubocop:disable all
|
8
9
|
class BaseModel < CoreLibrary::BaseModel
|
9
10
|
# Returns a Hash representation of the current object.
|
10
11
|
def to_hash
|
@@ -15,48 +16,95 @@ module ShellDataReportingApIs
|
|
15
16
|
instance_variables.each do |name|
|
16
17
|
value = instance_variable_get(name)
|
17
18
|
name = name[1..]
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
19
|
+
if name == 'additional_properties'
|
20
|
+
additional_properties = process_additional_properties(value, self.class.names)
|
21
|
+
hash.merge!(additional_properties)
|
22
|
+
else
|
23
|
+
key = self.class.names.key?(name) ? self.class.names[name] : name
|
24
|
+
optional_fields = self.class.optionals
|
25
|
+
nullable_fields = self.class.nullables
|
26
|
+
if value.nil?
|
27
|
+
next unless nullable_fields.include?(name)
|
28
|
+
|
29
|
+
if !optional_fields.include?(name) && !nullable_fields.include?(name)
|
30
|
+
raise ArgumentError,
|
31
|
+
"`#{name}` cannot be nil in `#{self.class}`. Please specify a valid value."
|
32
|
+
end
|
27
33
|
end
|
28
|
-
end
|
29
34
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
35
|
+
hash[key] = nil
|
36
|
+
unless value.nil?
|
37
|
+
if respond_to?("to_custom_#{name}")
|
38
|
+
if (value.instance_of? Array) || (value.instance_of? Hash)
|
39
|
+
params = [hash, key]
|
40
|
+
hash[key] = send("to_custom_#{name}", *params)
|
41
|
+
else
|
42
|
+
hash[key] = send("to_custom_#{name}")
|
43
|
+
end
|
44
|
+
elsif respond_to?("to_union_type_#{name}")
|
45
|
+
hash[key] = send("to_union_type_#{name}")
|
46
|
+
elsif value.instance_of? Array
|
47
|
+
hash[key] = value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
|
48
|
+
elsif value.instance_of? Hash
|
49
|
+
hash[key] = {}
|
50
|
+
value.each do |k, v|
|
51
|
+
hash[key][k] = v.is_a?(BaseModel) ? v.to_hash : v
|
52
|
+
end
|
36
53
|
else
|
37
|
-
hash[key] =
|
54
|
+
hash[key] = value.is_a?(BaseModel) ? value.to_hash : value
|
38
55
|
end
|
39
|
-
elsif respond_to?("to_union_type_#{name}")
|
40
|
-
hash[key] = send("to_union_type_#{name}")
|
41
|
-
elsif value.instance_of? Array
|
42
|
-
hash[key] = value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
|
43
|
-
elsif value.instance_of? Hash
|
44
|
-
hash[key] = {}
|
45
|
-
value.each do |k, v|
|
46
|
-
hash[key][k] = v.is_a?(BaseModel) ? v.to_hash : v
|
47
|
-
end
|
48
|
-
else
|
49
|
-
hash[key] = value.is_a?(BaseModel) ? value.to_hash : value
|
50
56
|
end
|
51
57
|
end
|
52
58
|
end
|
53
59
|
hash
|
54
60
|
end
|
55
61
|
|
62
|
+
# Processes additional properties, ensuring no conflicts with existing properties.
|
63
|
+
def process_additional_properties(additional_properties, existing_prop_names)
|
64
|
+
hash = {}
|
65
|
+
additional_properties.each do |name, value|
|
66
|
+
check_for_conflict(name, existing_prop_names)
|
67
|
+
|
68
|
+
hash[name] = if value.is_a?(Array)
|
69
|
+
process_array(value)
|
70
|
+
elsif value.is_a?(Hash)
|
71
|
+
process_hash(value)
|
72
|
+
else
|
73
|
+
process_basic_value(value)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
hash
|
77
|
+
end
|
78
|
+
|
79
|
+
# Checks if an additional property conflicts with a model's existing property.
|
80
|
+
def check_for_conflict(name, existing_prop_names)
|
81
|
+
return unless existing_prop_names.key?(name)
|
82
|
+
|
83
|
+
raise ArgumentError, "An additional property key, '#{name}' conflicts with one of the model's properties"
|
84
|
+
end
|
85
|
+
|
86
|
+
# Processes an array of values, recursively calling `to_hash` on BaseModel objects.
|
87
|
+
def process_array(value)
|
88
|
+
value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
|
89
|
+
end
|
90
|
+
|
91
|
+
# Processes a hash of values, recursively calling `to_hash` on BaseModel objects.
|
92
|
+
def process_hash(value)
|
93
|
+
value.transform_values do |v|
|
94
|
+
v.is_a?(BaseModel) ? v.to_hash : v
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# Processes a basic value (non-array, non-hash).
|
99
|
+
def process_basic_value(value)
|
100
|
+
value.is_a?(BaseModel) ? value.to_hash : value
|
101
|
+
end
|
102
|
+
|
56
103
|
# Returns a JSON representation of the curent object.
|
57
104
|
def to_json(options = {})
|
58
105
|
hash = to_hash
|
59
106
|
hash.to_json(options)
|
60
107
|
end
|
61
108
|
end
|
109
|
+
# rubocop:enable all
|
62
110
|
end
|
@@ -237,31 +237,22 @@ module ShellDataReportingApIs
|
|
237
237
|
]
|
238
238
|
end
|
239
239
|
|
240
|
-
def initialize(pricing_account_id = SKIP,
|
241
|
-
pricing_account_number = SKIP,
|
240
|
+
def initialize(pricing_account_id = SKIP, pricing_account_number = SKIP,
|
242
241
|
pricing_account_short_name = SKIP,
|
243
|
-
pricing_account_full_name = SKIP,
|
244
|
-
|
245
|
-
|
246
|
-
fee_rule_date_effective = SKIP,
|
247
|
-
fee_rule_date_terminated = SKIP,
|
248
|
-
bonus_paid_to = SKIP,
|
242
|
+
pricing_account_full_name = SKIP, fee_rule_id = SKIP,
|
243
|
+
fee_rule_description = SKIP, fee_rule_date_effective = SKIP,
|
244
|
+
fee_rule_date_terminated = SKIP, bonus_paid_to = SKIP,
|
249
245
|
bonus_paid_to_account_id = SKIP,
|
250
246
|
bonus_paid_to_account_number = SKIP,
|
251
247
|
bonus_paid_to_account_short_name = SKIP,
|
252
|
-
bonus_paid_to_account_full_name = SKIP,
|
253
|
-
frequency = SKIP,
|
248
|
+
bonus_paid_to_account_full_name = SKIP, frequency = SKIP,
|
254
249
|
next_calculation_date = SKIP,
|
255
|
-
previous_calculated_date = SKIP,
|
256
|
-
fee_rule_basis = SKIP,
|
250
|
+
previous_calculated_date = SKIP, fee_rule_basis = SKIP,
|
257
251
|
fee_rule_currency_code = SKIP,
|
258
252
|
fee_rule_currency_symbol = SKIP,
|
259
|
-
fee_rule_available_from = SKIP,
|
260
|
-
|
261
|
-
|
262
|
-
fee_rule_tiers = SKIP,
|
263
|
-
associated_accounts = SKIP,
|
264
|
-
fee_rule_products = SKIP)
|
253
|
+
fee_rule_available_from = SKIP, fee_rule_available_to = SKIP,
|
254
|
+
fee_rule_locations = SKIP, fee_rule_tiers = SKIP,
|
255
|
+
associated_accounts = SKIP, fee_rule_products = SKIP)
|
265
256
|
@pricing_account_id = pricing_account_id unless pricing_account_id == SKIP
|
266
257
|
@pricing_account_number = pricing_account_number unless pricing_account_number == SKIP
|
267
258
|
unless pricing_account_short_name == SKIP
|
@@ -272,37 +272,22 @@ module ShellDataReportingApIs
|
|
272
272
|
]
|
273
273
|
end
|
274
274
|
|
275
|
-
def initialize(payer_id = SKIP,
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
account_number = SKIP,
|
281
|
-
account_short_name = SKIP,
|
282
|
-
account_full_name = SKIP,
|
283
|
-
invoice_account_id = SKIP,
|
284
|
-
invoice_account_number = SKIP,
|
275
|
+
def initialize(payer_id = SKIP, payer_number = SKIP,
|
276
|
+
payer_short_name = SKIP, payer_full_name = SKIP,
|
277
|
+
account_id = SKIP, account_number = SKIP,
|
278
|
+
account_short_name = SKIP, account_full_name = SKIP,
|
279
|
+
invoice_account_id = SKIP, invoice_account_number = SKIP,
|
285
280
|
invoice_account_short_name = SKIP,
|
286
|
-
invoice_account_full_name = SKIP,
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
fee_item_currency_code = SKIP,
|
295
|
-
fee_item_currency_symbol = SKIP,
|
296
|
-
prorated_volume = SKIP,
|
297
|
-
total_volume = SKIP,
|
298
|
-
fee_product = SKIP,
|
299
|
-
invoice_gross_amount = SKIP,
|
300
|
-
invoice_net_amount = SKIP,
|
301
|
-
invoice_vat_amount = SKIP,
|
302
|
-
is_fee_cancelled = SKIP,
|
281
|
+
invoice_account_full_name = SKIP, fee_rule_id = SKIP,
|
282
|
+
fee_rule_description = SKIP, from_date = SKIP,
|
283
|
+
to_date = SKIP, bonus_paid_to = SKIP, fee_item_id = SKIP,
|
284
|
+
fee_rule_basis = SKIP, fee_item_currency_code = SKIP,
|
285
|
+
fee_item_currency_symbol = SKIP, prorated_volume = SKIP,
|
286
|
+
total_volume = SKIP, fee_product = SKIP,
|
287
|
+
invoice_gross_amount = SKIP, invoice_net_amount = SKIP,
|
288
|
+
invoice_vat_amount = SKIP, is_fee_cancelled = SKIP,
|
303
289
|
fee_item_tier_prorated_volume = SKIP,
|
304
|
-
fee_item_tier_total_volume = SKIP,
|
305
|
-
tier_minimum = SKIP,
|
290
|
+
fee_item_tier_total_volume = SKIP, tier_minimum = SKIP,
|
306
291
|
tier_rate = SKIP)
|
307
292
|
@payer_id = payer_id unless payer_id == SKIP
|
308
293
|
@payer_number = payer_number unless payer_number == SKIP
|
@@ -105,15 +105,9 @@ module ShellDataReportingApIs
|
|
105
105
|
]
|
106
106
|
end
|
107
107
|
|
108
|
-
def initialize(level = SKIP,
|
109
|
-
|
110
|
-
|
111
|
-
wednesday = SKIP,
|
112
|
-
thursday = SKIP,
|
113
|
-
friday = SKIP,
|
114
|
-
saturday = SKIP,
|
115
|
-
sunday = SKIP,
|
116
|
-
time_from = SKIP,
|
108
|
+
def initialize(level = SKIP, monday = SKIP, tuesday = SKIP,
|
109
|
+
wednesday = SKIP, thursday = SKIP, friday = SKIP,
|
110
|
+
saturday = SKIP, sunday = SKIP, time_from = SKIP,
|
117
111
|
time_to = SKIP)
|
118
112
|
@level = level unless level == SKIP
|
119
113
|
@monday = monday unless monday == SKIP
|
@@ -169,25 +169,14 @@ module ShellDataReportingApIs
|
|
169
169
|
]
|
170
170
|
end
|
171
171
|
|
172
|
-
def initialize(account_id = SKIP,
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
month = SKIP,
|
181
|
-
pan = SKIP,
|
182
|
-
payer_id = SKIP,
|
183
|
-
payer_number = SKIP,
|
184
|
-
payer_short_name = SKIP,
|
185
|
-
total_amount = SKIP,
|
186
|
-
total_quantity = SKIP,
|
187
|
-
total_sales_items = SKIP,
|
188
|
-
total_transactions = SKIP,
|
189
|
-
vrn = SKIP,
|
190
|
-
week = SKIP,
|
172
|
+
def initialize(account_id = SKIP, account_number = SKIP,
|
173
|
+
account_short_name = SKIP, card_id = SKIP,
|
174
|
+
currency_code = SKIP, currency_symbol = SKIP, day = SKIP,
|
175
|
+
driver_name = SKIP, month = SKIP, pan = SKIP,
|
176
|
+
payer_id = SKIP, payer_number = SKIP,
|
177
|
+
payer_short_name = SKIP, total_amount = SKIP,
|
178
|
+
total_quantity = SKIP, total_sales_items = SKIP,
|
179
|
+
total_transactions = SKIP, vrn = SKIP, week = SKIP,
|
191
180
|
year = SKIP)
|
192
181
|
@account_id = account_id unless account_id == SKIP
|
193
182
|
@account_number = account_number unless account_number == SKIP
|
@@ -57,9 +57,9 @@ module ShellDataReportingApIs
|
|
57
57
|
# Card Group Status
|
58
58
|
# Mandatory
|
59
59
|
# Allowed values:
|
60
|
-
# •
|
61
|
-
# •
|
62
|
-
# •
|
60
|
+
# • ALL
|
61
|
+
# • TERMINATED
|
62
|
+
# • ACTIVE
|
63
63
|
# @return [String]
|
64
64
|
attr_accessor :status
|
65
65
|
|
@@ -118,15 +118,9 @@ module ShellDataReportingApIs
|
|
118
118
|
]
|
119
119
|
end
|
120
120
|
|
121
|
-
def initialize(col_co_id = SKIP,
|
122
|
-
|
123
|
-
|
124
|
-
payer_number = SKIP,
|
125
|
-
account = SKIP,
|
126
|
-
card_group_name = SKIP,
|
127
|
-
status = SKIP,
|
128
|
-
current_page = SKIP,
|
129
|
-
page_size = SKIP)
|
121
|
+
def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP,
|
122
|
+
payer_number = SKIP, account = SKIP, card_group_name = SKIP,
|
123
|
+
status = SKIP, current_page = SKIP, page_size = SKIP)
|
130
124
|
@col_co_id = col_co_id unless col_co_id == SKIP
|
131
125
|
@col_co_code = col_co_code unless col_co_code == SKIP
|
132
126
|
@payer_id = payer_id unless payer_id == SKIP
|
@@ -62,12 +62,8 @@ module ShellDataReportingApIs
|
|
62
62
|
[]
|
63
63
|
end
|
64
64
|
|
65
|
-
def initialize(card_groups = SKIP,
|
66
|
-
|
67
|
-
row_count = SKIP,
|
68
|
-
total_pages = SKIP,
|
69
|
-
error = SKIP,
|
70
|
-
request_id = SKIP)
|
65
|
+
def initialize(card_groups = SKIP, current_page = SKIP, row_count = SKIP,
|
66
|
+
total_pages = SKIP, error = SKIP, request_id = SKIP)
|
71
67
|
@card_groups = card_groups unless card_groups == SKIP
|
72
68
|
@current_page = current_page unless current_page == SKIP
|
73
69
|
@row_count = row_count unless row_count == SKIP
|
@@ -188,27 +188,17 @@ module ShellDataReportingApIs
|
|
188
188
|
]
|
189
189
|
end
|
190
190
|
|
191
|
-
def initialize(account_id = SKIP,
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
card_type_code = SKIP,
|
201
|
-
card_type_id = SKIP,
|
202
|
-
card_type_name = SKIP,
|
203
|
-
expired_cards = SKIP,
|
204
|
-
expiry_date = SKIP,
|
205
|
-
print_on_card = SKIP,
|
206
|
-
renewal_pending_cards = SKIP,
|
207
|
-
replaced_cards = SKIP,
|
208
|
-
status = SKIP,
|
191
|
+
def initialize(account_id = SKIP, account_number = SKIP,
|
192
|
+
account_short_name = SKIP, active_cards = SKIP,
|
193
|
+
blocked_cards = SKIP, cancelled_cards = SKIP,
|
194
|
+
card_delivery_point = SKIP, card_group_id = SKIP,
|
195
|
+
card_group_name = SKIP, card_type_code = SKIP,
|
196
|
+
card_type_id = SKIP, card_type_name = SKIP,
|
197
|
+
expired_cards = SKIP, expiry_date = SKIP,
|
198
|
+
print_on_card = SKIP, renewal_pending_cards = SKIP,
|
199
|
+
replaced_cards = SKIP, status = SKIP,
|
209
200
|
temporary_block_by_customer = SKIP,
|
210
|
-
temporary_block_by_shell = SKIP,
|
211
|
-
terminated_date = SKIP,
|
201
|
+
temporary_block_by_shell = SKIP, terminated_date = SKIP,
|
212
202
|
total_cards = SKIP)
|
213
203
|
@account_id = account_id unless account_id == SKIP
|
214
204
|
@account_number = account_number unless account_number == SKIP
|
@@ -91,13 +91,9 @@ module ShellDataReportingApIs
|
|
91
91
|
]
|
92
92
|
end
|
93
93
|
|
94
|
-
def initialize(col_co_id = SKIP,
|
95
|
-
|
96
|
-
|
97
|
-
payer_number = SKIP,
|
98
|
-
account_id = SKIP,
|
99
|
-
account_number = SKIP,
|
100
|
-
include_usage_restrictions = SKIP,
|
94
|
+
def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP,
|
95
|
+
payer_number = SKIP, account_id = SKIP,
|
96
|
+
account_number = SKIP, include_usage_restrictions = SKIP,
|
101
97
|
include_purchase_categories = SKIP)
|
102
98
|
@col_co_id = col_co_id unless col_co_id == SKIP
|
103
99
|
@col_co_code = col_co_code unless col_co_code == SKIP
|
@@ -44,9 +44,7 @@ module ShellDataReportingApIs
|
|
44
44
|
[]
|
45
45
|
end
|
46
46
|
|
47
|
-
def initialize(customer_card_types = SKIP,
|
48
|
-
error = SKIP,
|
49
|
-
request_id = SKIP)
|
47
|
+
def initialize(customer_card_types = SKIP, error = SKIP, request_id = SKIP)
|
50
48
|
@customer_card_types = customer_card_types unless customer_card_types == SKIP
|
51
49
|
@error = error unless error == SKIP
|
52
50
|
@request_id = request_id unless request_id == SKIP
|
@@ -275,40 +275,24 @@ module ShellDataReportingApIs
|
|
275
275
|
]
|
276
276
|
end
|
277
277
|
|
278
|
-
def initialize(can_have_pin = SKIP,
|
279
|
-
|
280
|
-
|
281
|
-
col_co_currency_code = SKIP,
|
282
|
-
customer_card_type_id = SKIP,
|
283
|
-
day_time_restrictions = SKIP,
|
278
|
+
def initialize(can_have_pin = SKIP, card_type_id = SKIP,
|
279
|
+
card_type_name = SKIP, col_co_currency_code = SKIP,
|
280
|
+
customer_card_type_id = SKIP, day_time_restrictions = SKIP,
|
284
281
|
default_purchase_category_id = SKIP,
|
285
|
-
emboss_account_name = SKIP,
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
is_national = SKIP,
|
291
|
-
is_partner_sites_included = SKIP,
|
292
|
-
is_shell_sites_only = SKIP,
|
293
|
-
is_virtual = SKIP,
|
294
|
-
is_visible_to_customers = SKIP,
|
295
|
-
is_active = SKIP,
|
282
|
+
emboss_account_name = SKIP, expiry_period = SKIP,
|
283
|
+
is_crt = SKIP, is_fleet = SKIP, is_international = SKIP,
|
284
|
+
is_national = SKIP, is_partner_sites_included = SKIP,
|
285
|
+
is_shell_sites_only = SKIP, is_virtual = SKIP,
|
286
|
+
is_visible_to_customers = SKIP, is_active = SKIP,
|
296
287
|
is_card_available_for_download = SKIP,
|
297
|
-
is_card_visible_to_customers = SKIP,
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
emv_contactless = SKIP,
|
304
|
-
rfid = SKIP,
|
305
|
-
pin_change_supported = SKIP,
|
306
|
-
require_pin = SKIP,
|
307
|
-
offline_pin = SKIP,
|
308
|
-
is_default = SKIP,
|
288
|
+
is_card_visible_to_customers = SKIP, pan_length = SKIP,
|
289
|
+
purchase_categories = SKIP, token_type_id = SKIP,
|
290
|
+
token_type_name = SKIP, usage_restrictions = SKIP,
|
291
|
+
emv_contactless = SKIP, rfid = SKIP,
|
292
|
+
pin_change_supported = SKIP, require_pin = SKIP,
|
293
|
+
offline_pin = SKIP, is_default = SKIP,
|
309
294
|
applications_to_show_npii_tokens = SKIP,
|
310
|
-
medium_type_id = SKIP,
|
311
|
-
medium_type = SKIP,
|
295
|
+
medium_type_id = SKIP, medium_type = SKIP,
|
312
296
|
col_co_currency_symbol = SKIP)
|
313
297
|
@can_have_pin = can_have_pin unless can_have_pin == SKIP
|
314
298
|
@card_type_id = card_type_id unless card_type_id == SKIP
|