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.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +104 -0
- data/lib/shell_data_reporting_ap_is/api_helper.rb +10 -0
- data/lib/shell_data_reporting_ap_is/client.rb +84 -0
- data/lib/shell_data_reporting_ap_is/configuration.rb +110 -0
- data/lib/shell_data_reporting_ap_is/controllers/base_controller.rb +66 -0
- data/lib/shell_data_reporting_ap_is/controllers/customer_controller.rb +478 -0
- data/lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb +470 -0
- data/lib/shell_data_reporting_ap_is/controllers/o_auth_authorization_controller.rb +42 -0
- data/lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb +878 -0
- data/lib/shell_data_reporting_ap_is/exceptions/api_exception.rb +10 -0
- data/lib/shell_data_reporting_ap_is/exceptions/default_error_exception.rb +32 -0
- data/lib/shell_data_reporting_ap_is/exceptions/error_object_exception.rb +54 -0
- data/lib/shell_data_reporting_ap_is/exceptions/error_user_access_error1_exception.rb +32 -0
- data/lib/shell_data_reporting_ap_is/exceptions/o_auth_provider_exception.rb +48 -0
- data/lib/shell_data_reporting_ap_is/http/auth/basic_auth.rb +50 -0
- data/lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb +89 -0
- data/lib/shell_data_reporting_ap_is/http/http_call_back.rb +10 -0
- data/lib/shell_data_reporting_ap_is/http/http_method_enum.rb +10 -0
- data/lib/shell_data_reporting_ap_is/http/http_request.rb +10 -0
- data/lib/shell_data_reporting_ap_is/http/http_response.rb +10 -0
- data/lib/shell_data_reporting_ap_is/models/account_access.rb +128 -0
- data/lib/shell_data_reporting_ap_is/models/account_request.rb +252 -0
- data/lib/shell_data_reporting_ap_is/models/account_response.rb +111 -0
- data/lib/shell_data_reporting_ap_is/models/account_response_accounts_items.rb +750 -0
- data/lib/shell_data_reporting_ap_is/models/accounts.rb +65 -0
- data/lib/shell_data_reporting_ap_is/models/address.rb +174 -0
- data/lib/shell_data_reporting_ap_is/models/associated_account.rb +98 -0
- data/lib/shell_data_reporting_ap_is/models/audit_request.rb +256 -0
- data/lib/shell_data_reporting_ap_is/models/audit_response.rb +111 -0
- data/lib/shell_data_reporting_ap_is/models/audit_response_audits_items.rb +450 -0
- data/lib/shell_data_reporting_ap_is/models/bank_account.rb +192 -0
- data/lib/shell_data_reporting_ap_is/models/base_model.rb +62 -0
- data/lib/shell_data_reporting_ap_is/models/bonus_configuration.rb +419 -0
- data/lib/shell_data_reporting_ap_is/models/bonus_history.rb +444 -0
- data/lib/shell_data_reporting_ap_is/models/card_day_time_restrictions.rb +159 -0
- data/lib/shell_data_reporting_ap_is/models/card_exceptions.rb +268 -0
- data/lib/shell_data_reporting_ap_is/models/card_group_request.rb +178 -0
- data/lib/shell_data_reporting_ap_is/models/card_group_response.rb +109 -0
- data/lib/shell_data_reporting_ap_is/models/card_group_response_card_groups_items.rb +301 -0
- data/lib/shell_data_reporting_ap_is/models/card_type_request.rb +145 -0
- data/lib/shell_data_reporting_ap_is/models/card_type_response.rb +79 -0
- data/lib/shell_data_reporting_ap_is/models/card_type_response_customer_card_types_items.rb +470 -0
- data/lib/shell_data_reporting_ap_is/models/card_type_response_error.rb +60 -0
- data/lib/shell_data_reporting_ap_is/models/card_usage_restrictions.rb +281 -0
- data/lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb +159 -0
- data/lib/shell_data_reporting_ap_is/models/card_usage_summary_response.rb +79 -0
- data/lib/shell_data_reporting_ap_is/models/col_co_access.rb +88 -0
- data/lib/shell_data_reporting_ap_is/models/current_volume.rb +99 -0
- data/lib/shell_data_reporting_ap_is/models/customer_contract.rb +63 -0
- data/lib/shell_data_reporting_ap_is/models/customer_detail_request.rb +123 -0
- data/lib/shell_data_reporting_ap_is/models/customer_detail_response.rb +437 -0
- data/lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb +200 -0
- data/lib/shell_data_reporting_ap_is/models/customer_price_list_response.rb +82 -0
- data/lib/shell_data_reporting_ap_is/models/default_error_fault.rb +60 -0
- data/lib/shell_data_reporting_ap_is/models/default_error_fault_detail.rb +50 -0
- data/lib/shell_data_reporting_ap_is/models/delivery_addresses.rb +258 -0
- data/lib/shell_data_reporting_ap_is/models/eid_access.rb +75 -0
- data/lib/shell_data_reporting_ap_is/models/eid_document.rb +166 -0
- data/lib/shell_data_reporting_ap_is/models/eid_document_response.rb +140 -0
- data/lib/shell_data_reporting_ap_is/models/eid_download_req.rb +86 -0
- data/lib/shell_data_reporting_ap_is/models/eid_download_request.rb +50 -0
- data/lib/shell_data_reporting_ap_is/models/eid_search_req.rb +160 -0
- data/lib/shell_data_reporting_ap_is/models/eid_search_request.rb +70 -0
- data/lib/shell_data_reporting_ap_is/models/error_details.rb +81 -0
- data/lib/shell_data_reporting_ap_is/models/error_status.rb +60 -0
- data/lib/shell_data_reporting_ap_is/models/error_user_access.rb +50 -0
- data/lib/shell_data_reporting_ap_is/models/error_user_access_error.rb +60 -0
- data/lib/shell_data_reporting_ap_is/models/exception_product.rb +65 -0
- data/lib/shell_data_reporting_ap_is/models/exception_site_location.rb +63 -0
- data/lib/shell_data_reporting_ap_is/models/fee_item.rb +977 -0
- data/lib/shell_data_reporting_ap_is/models/fee_item_summary_all_of0.rb +194 -0
- data/lib/shell_data_reporting_ap_is/models/fee_rule_location.rb +153 -0
- data/lib/shell_data_reporting_ap_is/models/fee_rule_product.rb +98 -0
- data/lib/shell_data_reporting_ap_is/models/fee_rule_tier.rb +74 -0
- data/lib/shell_data_reporting_ap_is/models/fee_summary_response.rb +85 -0
- data/lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb +124 -0
- data/lib/shell_data_reporting_ap_is/models/finance_currency.rb +98 -0
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_card.rb +73 -0
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_data.rb +267 -0
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_request.rb +197 -0
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_response.rb +79 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb +62 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_request.rb +50 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_request_filters.rb +146 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_response_data.rb +80 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_distribution_method.rb +99 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_download_req.rb +99 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_download_request.rb +50 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb +80 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_search_details.rb +913 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_search_request.rb +91 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_search_request_filters.rb +344 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_search_response.rb +127 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_summary_details.rb +129 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_summary_request.rb +50 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb +345 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_summary_response.rb +79 -0
- data/lib/shell_data_reporting_ap_is/models/invoices_summaries.rb +221 -0
- data/lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb +421 -0
- data/lib/shell_data_reporting_ap_is/models/logged_in_user_request.rb +107 -0
- data/lib/shell_data_reporting_ap_is/models/logged_in_user_response.rb +394 -0
- data/lib/shell_data_reporting_ap_is/models/monthly_invoice_trend.rb +112 -0
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb +360 -0
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb +84 -0
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response.rb +110 -0
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response_transactions_items.rb +1724 -0
- data/lib/shell_data_reporting_ap_is/models/o_auth_provider_error_enum.rb +45 -0
- data/lib/shell_data_reporting_ap_is/models/o_auth_token.rb +100 -0
- data/lib/shell_data_reporting_ap_is/models/past_statement_of_accounts.rb +502 -0
- data/lib/shell_data_reporting_ap_is/models/payer_access.rb +147 -0
- data/lib/shell_data_reporting_ap_is/models/payer_details.rb +1412 -0
- data/lib/shell_data_reporting_ap_is/models/payer_request.rb +126 -0
- data/lib/shell_data_reporting_ap_is/models/payer_response.rb +115 -0
- data/lib/shell_data_reporting_ap_is/models/payers.rb +109 -0
- data/lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb +322 -0
- data/lib/shell_data_reporting_ap_is/models/pin_advice_types.rb +80 -0
- data/lib/shell_data_reporting_ap_is/models/price_list.rb +485 -0
- data/lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb +477 -0
- data/lib/shell_data_reporting_ap_is/models/price_transaction_request.rb +572 -0
- data/lib/shell_data_reporting_ap_is/models/priced_request_data.rb +485 -0
- data/lib/shell_data_reporting_ap_is/models/priced_response_data.rb +2132 -0
- data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response.rb +79 -0
- data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response_transactions_summary_items.rb +242 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb +67 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_invoice_status_enum.rb +27 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_period_enum.rb +27 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_sort_order_enum.rb +37 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_request_v2.rb +72 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_resp_v2_refund_flag_enum.rb +23 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_response.rb +59 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_transactions_items.rb +1719 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_v2.rb +110 -0
- data/lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb +115 -0
- data/lib/shell_data_reporting_ap_is/models/pricing_history.rb +105 -0
- data/lib/shell_data_reporting_ap_is/models/purchase_categories.rb +114 -0
- data/lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb +217 -0
- data/lib/shell_data_reporting_ap_is/models/recent_transaction_request.rb +66 -0
- data/lib/shell_data_reporting_ap_is/models/recent_transactions.rb +918 -0
- data/lib/shell_data_reporting_ap_is/models/recent_transactions_response.rb +110 -0
- data/lib/shell_data_reporting_ap_is/models/role.rb +102 -0
- data/lib/shell_data_reporting_ap_is/models/search_doc_req.rb +269 -0
- data/lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb +204 -0
- data/lib/shell_data_reporting_ap_is/models/search_documents_request.rb +70 -0
- data/lib/shell_data_reporting_ap_is/models/search_documents_response.rb +122 -0
- data/lib/shell_data_reporting_ap_is/models/search_soa_req.rb +197 -0
- data/lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb +220 -0
- data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_request.rb +70 -0
- data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_response.rb +120 -0
- data/lib/shell_data_reporting_ap_is/models/site_location.rb +67 -0
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_request.rb +50 -0
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_request_filters.rb +197 -0
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_resp.rb +138 -0
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_response.rb +80 -0
- data/lib/shell_data_reporting_ap_is/models/tier.rb +167 -0
- data/lib/shell_data_reporting_ap_is/models/transaction_exceptions.rb +1267 -0
- data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb +267 -0
- data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb +100 -0
- data/lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb +348 -0
- data/lib/shell_data_reporting_ap_is/models/transaction_fees_response.rb +111 -0
- data/lib/shell_data_reporting_ap_is/models/update_odometer.rb +62 -0
- data/lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb +67 -0
- data/lib/shell_data_reporting_ap_is/models/update_odometer_request.rb +146 -0
- data/lib/shell_data_reporting_ap_is/models/update_odometer_response.rb +93 -0
- data/lib/shell_data_reporting_ap_is/models/usage_summary.rb +202 -0
- data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb +118 -0
- data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_response.rb +120 -0
- data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_request.rb +103 -0
- data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_response.rb +120 -0
- data/lib/shell_data_reporting_ap_is/utilities/date_time_helper.rb +11 -0
- data/lib/shell_data_reporting_ap_is/utilities/file_wrapper.rb +16 -0
- data/lib/shell_data_reporting_ap_is.rb +229 -0
- data/test/controllers/controller_test_base.rb +34 -0
- data/test/controllers/test_invoice_controller.rb +398 -0
- data/test/controllers/test_transaction_controller.rb +235 -0
- data/test/http_response_catcher.rb +19 -0
- metadata +302 -0
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
# Accounts Model.
|
|
8
|
+
class Accounts < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Account Id of the customer.
|
|
13
|
+
# Optional, if AccountNumber is passed, else mandatory.
|
|
14
|
+
# @return [Integer]
|
|
15
|
+
attr_accessor :account_id
|
|
16
|
+
|
|
17
|
+
# Account Number of the customer.
|
|
18
|
+
# Optional, if AccountId is passed, else mandatory.
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :account_number
|
|
21
|
+
|
|
22
|
+
# A mapping from model property names to API property names.
|
|
23
|
+
def self.names
|
|
24
|
+
@_hash = {} if @_hash.nil?
|
|
25
|
+
@_hash['account_id'] = 'AccountId'
|
|
26
|
+
@_hash['account_number'] = 'AccountNumber'
|
|
27
|
+
@_hash
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for optional fields
|
|
31
|
+
def self.optionals
|
|
32
|
+
%w[
|
|
33
|
+
account_id
|
|
34
|
+
account_number
|
|
35
|
+
]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for nullable fields
|
|
39
|
+
def self.nullables
|
|
40
|
+
%w[
|
|
41
|
+
account_id
|
|
42
|
+
account_number
|
|
43
|
+
]
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def initialize(account_id = SKIP,
|
|
47
|
+
account_number = SKIP)
|
|
48
|
+
@account_id = account_id unless account_id == SKIP
|
|
49
|
+
@account_number = account_number unless account_number == SKIP
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Creates an instance of the object from a hash.
|
|
53
|
+
def self.from_hash(hash)
|
|
54
|
+
return nil unless hash
|
|
55
|
+
|
|
56
|
+
# Extract variables from the hash.
|
|
57
|
+
account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP
|
|
58
|
+
account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
|
|
59
|
+
|
|
60
|
+
# Create object from extracted values.
|
|
61
|
+
Accounts.new(account_id,
|
|
62
|
+
account_number)
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -0,0 +1,174 @@
|
|
|
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
|
+
# Address Model.
|
|
8
|
+
class Address < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Address Id in cards platform.
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
attr_accessor :address_id
|
|
15
|
+
|
|
16
|
+
# Address line1
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :address_line1
|
|
19
|
+
|
|
20
|
+
# Address line2
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :address_line2
|
|
23
|
+
|
|
24
|
+
# AddressLine3
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :address_line3
|
|
27
|
+
|
|
28
|
+
# ZipCode
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :zip_code
|
|
31
|
+
|
|
32
|
+
# City
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :city
|
|
35
|
+
|
|
36
|
+
# Region Id of the address.
|
|
37
|
+
# @return [Integer]
|
|
38
|
+
attr_accessor :region_id
|
|
39
|
+
|
|
40
|
+
# Country ISO code of the address
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :country_iso_code
|
|
43
|
+
|
|
44
|
+
# Country for the address
|
|
45
|
+
# @return [String]
|
|
46
|
+
attr_accessor :country
|
|
47
|
+
|
|
48
|
+
# Telephone number of the address contact
|
|
49
|
+
# @return [String]
|
|
50
|
+
attr_accessor :telephone
|
|
51
|
+
|
|
52
|
+
# Email address of the address contact
|
|
53
|
+
# @return [String]
|
|
54
|
+
attr_accessor :email_address
|
|
55
|
+
|
|
56
|
+
# Fax number of the address contact
|
|
57
|
+
# @return [String]
|
|
58
|
+
attr_accessor :fax
|
|
59
|
+
|
|
60
|
+
# A mapping from model property names to API property names.
|
|
61
|
+
def self.names
|
|
62
|
+
@_hash = {} if @_hash.nil?
|
|
63
|
+
@_hash['address_id'] = 'AddressId'
|
|
64
|
+
@_hash['address_line1'] = 'AddressLine1'
|
|
65
|
+
@_hash['address_line2'] = 'AddressLine2'
|
|
66
|
+
@_hash['address_line3'] = 'AddressLine3'
|
|
67
|
+
@_hash['zip_code'] = 'ZipCode'
|
|
68
|
+
@_hash['city'] = 'City'
|
|
69
|
+
@_hash['region_id'] = 'RegionId'
|
|
70
|
+
@_hash['country_iso_code'] = 'CountryISOCode'
|
|
71
|
+
@_hash['country'] = 'Country'
|
|
72
|
+
@_hash['telephone'] = 'Telephone'
|
|
73
|
+
@_hash['email_address'] = 'EmailAddress'
|
|
74
|
+
@_hash['fax'] = 'Fax'
|
|
75
|
+
@_hash
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# An array for optional fields
|
|
79
|
+
def self.optionals
|
|
80
|
+
%w[
|
|
81
|
+
address_id
|
|
82
|
+
address_line1
|
|
83
|
+
address_line2
|
|
84
|
+
address_line3
|
|
85
|
+
zip_code
|
|
86
|
+
city
|
|
87
|
+
region_id
|
|
88
|
+
country_iso_code
|
|
89
|
+
country
|
|
90
|
+
telephone
|
|
91
|
+
email_address
|
|
92
|
+
fax
|
|
93
|
+
]
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# An array for nullable fields
|
|
97
|
+
def self.nullables
|
|
98
|
+
%w[
|
|
99
|
+
address_id
|
|
100
|
+
address_line1
|
|
101
|
+
address_line2
|
|
102
|
+
address_line3
|
|
103
|
+
zip_code
|
|
104
|
+
city
|
|
105
|
+
region_id
|
|
106
|
+
country_iso_code
|
|
107
|
+
country
|
|
108
|
+
telephone
|
|
109
|
+
email_address
|
|
110
|
+
fax
|
|
111
|
+
]
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def initialize(address_id = SKIP,
|
|
115
|
+
address_line1 = SKIP,
|
|
116
|
+
address_line2 = SKIP,
|
|
117
|
+
address_line3 = SKIP,
|
|
118
|
+
zip_code = SKIP,
|
|
119
|
+
city = SKIP,
|
|
120
|
+
region_id = SKIP,
|
|
121
|
+
country_iso_code = SKIP,
|
|
122
|
+
country = SKIP,
|
|
123
|
+
telephone = SKIP,
|
|
124
|
+
email_address = SKIP,
|
|
125
|
+
fax = SKIP)
|
|
126
|
+
@address_id = address_id unless address_id == SKIP
|
|
127
|
+
@address_line1 = address_line1 unless address_line1 == SKIP
|
|
128
|
+
@address_line2 = address_line2 unless address_line2 == SKIP
|
|
129
|
+
@address_line3 = address_line3 unless address_line3 == SKIP
|
|
130
|
+
@zip_code = zip_code unless zip_code == SKIP
|
|
131
|
+
@city = city unless city == SKIP
|
|
132
|
+
@region_id = region_id unless region_id == SKIP
|
|
133
|
+
@country_iso_code = country_iso_code unless country_iso_code == SKIP
|
|
134
|
+
@country = country unless country == SKIP
|
|
135
|
+
@telephone = telephone unless telephone == SKIP
|
|
136
|
+
@email_address = email_address unless email_address == SKIP
|
|
137
|
+
@fax = fax unless fax == SKIP
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Creates an instance of the object from a hash.
|
|
141
|
+
def self.from_hash(hash)
|
|
142
|
+
return nil unless hash
|
|
143
|
+
|
|
144
|
+
# Extract variables from the hash.
|
|
145
|
+
address_id = hash.key?('AddressId') ? hash['AddressId'] : SKIP
|
|
146
|
+
address_line1 = hash.key?('AddressLine1') ? hash['AddressLine1'] : SKIP
|
|
147
|
+
address_line2 = hash.key?('AddressLine2') ? hash['AddressLine2'] : SKIP
|
|
148
|
+
address_line3 = hash.key?('AddressLine3') ? hash['AddressLine3'] : SKIP
|
|
149
|
+
zip_code = hash.key?('ZipCode') ? hash['ZipCode'] : SKIP
|
|
150
|
+
city = hash.key?('City') ? hash['City'] : SKIP
|
|
151
|
+
region_id = hash.key?('RegionId') ? hash['RegionId'] : SKIP
|
|
152
|
+
country_iso_code =
|
|
153
|
+
hash.key?('CountryISOCode') ? hash['CountryISOCode'] : SKIP
|
|
154
|
+
country = hash.key?('Country') ? hash['Country'] : SKIP
|
|
155
|
+
telephone = hash.key?('Telephone') ? hash['Telephone'] : SKIP
|
|
156
|
+
email_address = hash.key?('EmailAddress') ? hash['EmailAddress'] : SKIP
|
|
157
|
+
fax = hash.key?('Fax') ? hash['Fax'] : SKIP
|
|
158
|
+
|
|
159
|
+
# Create object from extracted values.
|
|
160
|
+
Address.new(address_id,
|
|
161
|
+
address_line1,
|
|
162
|
+
address_line2,
|
|
163
|
+
address_line3,
|
|
164
|
+
zip_code,
|
|
165
|
+
city,
|
|
166
|
+
region_id,
|
|
167
|
+
country_iso_code,
|
|
168
|
+
country,
|
|
169
|
+
telephone,
|
|
170
|
+
email_address,
|
|
171
|
+
fax)
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
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
|
+
# AssociatedAccount Model.
|
|
8
|
+
class AssociatedAccount < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Account identifier of the Associated Account associated with the Payer.
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
attr_accessor :associated_account_id
|
|
15
|
+
|
|
16
|
+
# Account number of the Associated Account associated with the Payer.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :associated_account_number
|
|
19
|
+
|
|
20
|
+
# Account associated with the Payer.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :associated_account_short_name
|
|
23
|
+
|
|
24
|
+
# Full name of the Associated Account associated with the Payer.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :associated_account_full_name
|
|
27
|
+
|
|
28
|
+
# A mapping from model property names to API property names.
|
|
29
|
+
def self.names
|
|
30
|
+
@_hash = {} if @_hash.nil?
|
|
31
|
+
@_hash['associated_account_id'] = 'AssociatedAccountId'
|
|
32
|
+
@_hash['associated_account_number'] = 'AssociatedAccountNumber'
|
|
33
|
+
@_hash['associated_account_short_name'] = 'AssociatedAccountShortName'
|
|
34
|
+
@_hash['associated_account_full_name'] = 'AssociatedAccountFullName'
|
|
35
|
+
@_hash
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for optional fields
|
|
39
|
+
def self.optionals
|
|
40
|
+
%w[
|
|
41
|
+
associated_account_id
|
|
42
|
+
associated_account_number
|
|
43
|
+
associated_account_short_name
|
|
44
|
+
associated_account_full_name
|
|
45
|
+
]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# An array for nullable fields
|
|
49
|
+
def self.nullables
|
|
50
|
+
%w[
|
|
51
|
+
associated_account_id
|
|
52
|
+
associated_account_number
|
|
53
|
+
associated_account_short_name
|
|
54
|
+
associated_account_full_name
|
|
55
|
+
]
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def initialize(associated_account_id = SKIP,
|
|
59
|
+
associated_account_number = SKIP,
|
|
60
|
+
associated_account_short_name = SKIP,
|
|
61
|
+
associated_account_full_name = SKIP)
|
|
62
|
+
@associated_account_id = associated_account_id unless associated_account_id == SKIP
|
|
63
|
+
unless associated_account_number == SKIP
|
|
64
|
+
@associated_account_number =
|
|
65
|
+
associated_account_number
|
|
66
|
+
end
|
|
67
|
+
unless associated_account_short_name == SKIP
|
|
68
|
+
@associated_account_short_name =
|
|
69
|
+
associated_account_short_name
|
|
70
|
+
end
|
|
71
|
+
unless associated_account_full_name == SKIP
|
|
72
|
+
@associated_account_full_name =
|
|
73
|
+
associated_account_full_name
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Creates an instance of the object from a hash.
|
|
78
|
+
def self.from_hash(hash)
|
|
79
|
+
return nil unless hash
|
|
80
|
+
|
|
81
|
+
# Extract variables from the hash.
|
|
82
|
+
associated_account_id =
|
|
83
|
+
hash.key?('AssociatedAccountId') ? hash['AssociatedAccountId'] : SKIP
|
|
84
|
+
associated_account_number =
|
|
85
|
+
hash.key?('AssociatedAccountNumber') ? hash['AssociatedAccountNumber'] : SKIP
|
|
86
|
+
associated_account_short_name =
|
|
87
|
+
hash.key?('AssociatedAccountShortName') ? hash['AssociatedAccountShortName'] : SKIP
|
|
88
|
+
associated_account_full_name =
|
|
89
|
+
hash.key?('AssociatedAccountFullName') ? hash['AssociatedAccountFullName'] : SKIP
|
|
90
|
+
|
|
91
|
+
# Create object from extracted values.
|
|
92
|
+
AssociatedAccount.new(associated_account_id,
|
|
93
|
+
associated_account_number,
|
|
94
|
+
associated_account_short_name,
|
|
95
|
+
associated_account_full_name)
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -0,0 +1,256 @@
|
|
|
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
|
+
# AuditRequest Model.
|
|
8
|
+
class AuditRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Status of requests to be fetched.
|
|
13
|
+
# • Success
|
|
14
|
+
# • Failed
|
|
15
|
+
# • InProgress
|
|
16
|
+
# • Submitted
|
|
17
|
+
# • Rejected
|
|
18
|
+
# • PendingApproval
|
|
19
|
+
# • All
|
|
20
|
+
# • MailedToCSC
|
|
21
|
+
# Optional
|
|
22
|
+
# If not passed “All” will be considered as the default value.
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :status
|
|
25
|
+
|
|
26
|
+
# Payer Number of the selected payer.
|
|
27
|
+
# Optional if PayerId is passed else Mandatory
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_accessor :payer_number
|
|
30
|
+
|
|
31
|
+
# Payer Id of the selected payer.
|
|
32
|
+
# Optional if PayerNumber is passed else Mandatory
|
|
33
|
+
# Example: 123456
|
|
34
|
+
# @return [Integer]
|
|
35
|
+
attr_accessor :payer_id
|
|
36
|
+
|
|
37
|
+
# Payer Id of the selected payer.
|
|
38
|
+
# Optional if PayerNumber is passed else Mandatory
|
|
39
|
+
# Example: 123456
|
|
40
|
+
# @return [String]
|
|
41
|
+
attr_accessor :account_number
|
|
42
|
+
|
|
43
|
+
# Collecting Company Code (Shell Code) of the selected payer.
|
|
44
|
+
# Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia,
|
|
45
|
+
# Ukraine etc. It is optional for other countries if ColCoID is provided.
|
|
46
|
+
# Example:
|
|
47
|
+
# 86 for Philippines
|
|
48
|
+
# 5 for UK
|
|
49
|
+
# @return [Integer]
|
|
50
|
+
attr_accessor :col_co_code
|
|
51
|
+
|
|
52
|
+
# Collecting Company Id of the selected payer.
|
|
53
|
+
# Optional if ColCoCode is passed else Mandatory.
|
|
54
|
+
# Example:
|
|
55
|
+
# 1 for Philippines
|
|
56
|
+
# 5 for UK
|
|
57
|
+
# @return [Integer]
|
|
58
|
+
attr_accessor :col_co_id
|
|
59
|
+
|
|
60
|
+
# Collecting Company Id of the selected payer.
|
|
61
|
+
# Optional if ColCoCode is passed else Mandatory.
|
|
62
|
+
# Example:
|
|
63
|
+
# 1 for Philippines
|
|
64
|
+
# 5 for UK
|
|
65
|
+
# @return [Accounts]
|
|
66
|
+
attr_accessor :accounts
|
|
67
|
+
|
|
68
|
+
# Page Size – Number of records to show on a page
|
|
69
|
+
# Optional
|
|
70
|
+
# Default value 50
|
|
71
|
+
# @return [Integer]
|
|
72
|
+
attr_accessor :page_size
|
|
73
|
+
|
|
74
|
+
# To search for requests submitted until this date.
|
|
75
|
+
# Optional
|
|
76
|
+
# Format: yyyyMMdd
|
|
77
|
+
# Example: 20200130
|
|
78
|
+
# If ToDate is not provided and FromDate is provided, then ToDate will be
|
|
79
|
+
# considered as current date or 30 days from FromDate, whichever is earlier.
|
|
80
|
+
# However, when both FromDate and ToDate is not provided then last 30 days
|
|
81
|
+
# will be considered for filtering.
|
|
82
|
+
# @return [Array[String]]
|
|
83
|
+
attr_accessor :requested_operation
|
|
84
|
+
|
|
85
|
+
# Allowed Sorting Options:
|
|
86
|
+
# 1. SubmittedDateDescending
|
|
87
|
+
# 2. SubmittedDateAscending
|
|
88
|
+
# 3. AccountNumberAscending
|
|
89
|
+
# 4. AccountNumberDescending
|
|
90
|
+
# Optional: Default value is 1
|
|
91
|
+
# Example value to be passed: 1,3
|
|
92
|
+
# @return [String]
|
|
93
|
+
attr_accessor :sort_order
|
|
94
|
+
|
|
95
|
+
# Search text used as criteria to filter the requests.
|
|
96
|
+
# Optional
|
|
97
|
+
# Minimum length is 4 characters (configurable). Else, an error (0007) will
|
|
98
|
+
# be returned. When valid text is provided, MS will return all the records
|
|
99
|
+
# that contains the Search Text within any of the look up fields
|
|
100
|
+
# @return [String]
|
|
101
|
+
attr_accessor :search_text
|
|
102
|
+
|
|
103
|
+
# Page Number (as shown to the users)
|
|
104
|
+
# Optional
|
|
105
|
+
# Default value 1
|
|
106
|
+
# @return [Integer]
|
|
107
|
+
attr_accessor :current_page
|
|
108
|
+
|
|
109
|
+
# To search for requests submitted from this date.
|
|
110
|
+
# Optional
|
|
111
|
+
# Maximum of X days duration allowed per search. The X value is configurable
|
|
112
|
+
# and initially set to 180 days.
|
|
113
|
+
# Format: yyyyMMdd
|
|
114
|
+
# Example: 20200101
|
|
115
|
+
# If FromDate is not provided and ToDate is provided, then FromDate will be
|
|
116
|
+
# considered as 30 days less than ToDate. However, when both FromDate and
|
|
117
|
+
# ToDate is not provided then last 30 days will be considered for filtering.
|
|
118
|
+
# @return [String]
|
|
119
|
+
attr_accessor :from_date
|
|
120
|
+
|
|
121
|
+
# To search for requests submitted until this date.
|
|
122
|
+
# Optional
|
|
123
|
+
# Format: yyyyMMdd
|
|
124
|
+
# Example: 20200130
|
|
125
|
+
# If ToDate is not provided and FromDate is provided, then ToDate will be
|
|
126
|
+
# considered as current date or 30 days from FromDate, whichever is earlier.
|
|
127
|
+
# However, when both FromDate and ToDate is not provided then last 30 days
|
|
128
|
+
# will be considered for filtering.
|
|
129
|
+
# @return [String]
|
|
130
|
+
attr_accessor :to_date
|
|
131
|
+
|
|
132
|
+
# A mapping from model property names to API property names.
|
|
133
|
+
def self.names
|
|
134
|
+
@_hash = {} if @_hash.nil?
|
|
135
|
+
@_hash['status'] = 'Status'
|
|
136
|
+
@_hash['payer_number'] = 'PayerNumber'
|
|
137
|
+
@_hash['payer_id'] = 'PayerId'
|
|
138
|
+
@_hash['account_number'] = 'AccountNumber'
|
|
139
|
+
@_hash['col_co_code'] = 'ColCoCode'
|
|
140
|
+
@_hash['col_co_id'] = 'ColCoId'
|
|
141
|
+
@_hash['accounts'] = 'Accounts'
|
|
142
|
+
@_hash['page_size'] = 'PageSize'
|
|
143
|
+
@_hash['requested_operation'] = 'RequestedOperation'
|
|
144
|
+
@_hash['sort_order'] = 'SortOrder'
|
|
145
|
+
@_hash['search_text'] = 'SearchText'
|
|
146
|
+
@_hash['current_page'] = 'CurrentPage'
|
|
147
|
+
@_hash['from_date'] = 'FromDate'
|
|
148
|
+
@_hash['to_date'] = 'ToDate'
|
|
149
|
+
@_hash
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# An array for optional fields
|
|
153
|
+
def self.optionals
|
|
154
|
+
%w[
|
|
155
|
+
status
|
|
156
|
+
payer_number
|
|
157
|
+
payer_id
|
|
158
|
+
account_number
|
|
159
|
+
col_co_code
|
|
160
|
+
col_co_id
|
|
161
|
+
accounts
|
|
162
|
+
page_size
|
|
163
|
+
requested_operation
|
|
164
|
+
sort_order
|
|
165
|
+
search_text
|
|
166
|
+
current_page
|
|
167
|
+
from_date
|
|
168
|
+
to_date
|
|
169
|
+
]
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# An array for nullable fields
|
|
173
|
+
def self.nullables
|
|
174
|
+
%w[
|
|
175
|
+
payer_number
|
|
176
|
+
payer_id
|
|
177
|
+
account_number
|
|
178
|
+
col_co_code
|
|
179
|
+
col_co_id
|
|
180
|
+
sort_order
|
|
181
|
+
search_text
|
|
182
|
+
current_page
|
|
183
|
+
from_date
|
|
184
|
+
to_date
|
|
185
|
+
]
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
def initialize(status = SKIP,
|
|
189
|
+
payer_number = SKIP,
|
|
190
|
+
payer_id = SKIP,
|
|
191
|
+
account_number = SKIP,
|
|
192
|
+
col_co_code = SKIP,
|
|
193
|
+
col_co_id = SKIP,
|
|
194
|
+
accounts = SKIP,
|
|
195
|
+
page_size = SKIP,
|
|
196
|
+
requested_operation = SKIP,
|
|
197
|
+
sort_order = SKIP,
|
|
198
|
+
search_text = SKIP,
|
|
199
|
+
current_page = SKIP,
|
|
200
|
+
from_date = SKIP,
|
|
201
|
+
to_date = SKIP)
|
|
202
|
+
@status = status unless status == SKIP
|
|
203
|
+
@payer_number = payer_number unless payer_number == SKIP
|
|
204
|
+
@payer_id = payer_id unless payer_id == SKIP
|
|
205
|
+
@account_number = account_number unless account_number == SKIP
|
|
206
|
+
@col_co_code = col_co_code unless col_co_code == SKIP
|
|
207
|
+
@col_co_id = col_co_id unless col_co_id == SKIP
|
|
208
|
+
@accounts = accounts unless accounts == SKIP
|
|
209
|
+
@page_size = page_size unless page_size == SKIP
|
|
210
|
+
@requested_operation = requested_operation unless requested_operation == SKIP
|
|
211
|
+
@sort_order = sort_order unless sort_order == SKIP
|
|
212
|
+
@search_text = search_text unless search_text == SKIP
|
|
213
|
+
@current_page = current_page unless current_page == SKIP
|
|
214
|
+
@from_date = from_date unless from_date == SKIP
|
|
215
|
+
@to_date = to_date unless to_date == SKIP
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Creates an instance of the object from a hash.
|
|
219
|
+
def self.from_hash(hash)
|
|
220
|
+
return nil unless hash
|
|
221
|
+
|
|
222
|
+
# Extract variables from the hash.
|
|
223
|
+
status = hash.key?('Status') ? hash['Status'] : SKIP
|
|
224
|
+
payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
|
|
225
|
+
payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
|
|
226
|
+
account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
|
|
227
|
+
col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
|
|
228
|
+
col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
|
|
229
|
+
accounts = Accounts.from_hash(hash['Accounts']) if hash['Accounts']
|
|
230
|
+
page_size = hash.key?('PageSize') ? hash['PageSize'] : SKIP
|
|
231
|
+
requested_operation =
|
|
232
|
+
hash.key?('RequestedOperation') ? hash['RequestedOperation'] : SKIP
|
|
233
|
+
sort_order = hash.key?('SortOrder') ? hash['SortOrder'] : SKIP
|
|
234
|
+
search_text = hash.key?('SearchText') ? hash['SearchText'] : SKIP
|
|
235
|
+
current_page = hash.key?('CurrentPage') ? hash['CurrentPage'] : SKIP
|
|
236
|
+
from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
|
|
237
|
+
to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP
|
|
238
|
+
|
|
239
|
+
# Create object from extracted values.
|
|
240
|
+
AuditRequest.new(status,
|
|
241
|
+
payer_number,
|
|
242
|
+
payer_id,
|
|
243
|
+
account_number,
|
|
244
|
+
col_co_code,
|
|
245
|
+
col_co_id,
|
|
246
|
+
accounts,
|
|
247
|
+
page_size,
|
|
248
|
+
requested_operation,
|
|
249
|
+
sort_order,
|
|
250
|
+
search_text,
|
|
251
|
+
current_page,
|
|
252
|
+
from_date,
|
|
253
|
+
to_date)
|
|
254
|
+
end
|
|
255
|
+
end
|
|
256
|
+
end
|
|
@@ -0,0 +1,111 @@
|
|
|
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
|
+
# AuditResponse Model.
|
|
8
|
+
class AuditResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Array[AuditResponseAuditsItems]]
|
|
14
|
+
attr_accessor :audits
|
|
15
|
+
|
|
16
|
+
# Current Page
|
|
17
|
+
# @return [Integer]
|
|
18
|
+
attr_accessor :current_page
|
|
19
|
+
|
|
20
|
+
# Total row count matched for the given input criteria
|
|
21
|
+
# @return [Integer]
|
|
22
|
+
attr_accessor :row_count
|
|
23
|
+
|
|
24
|
+
# Calculated page count based on page size from the incoming API request and
|
|
25
|
+
# total number of rows matched for the given input criteria
|
|
26
|
+
# @return [Integer]
|
|
27
|
+
attr_accessor :total_pages
|
|
28
|
+
|
|
29
|
+
# Calculated page count based on page size from the incoming API request and
|
|
30
|
+
# total number of rows matched for the given input criteria
|
|
31
|
+
# @return [ErrorStatus]
|
|
32
|
+
attr_accessor :error
|
|
33
|
+
|
|
34
|
+
# API RequestId
|
|
35
|
+
# @return [String]
|
|
36
|
+
attr_accessor :request_id
|
|
37
|
+
|
|
38
|
+
# A mapping from model property names to API property names.
|
|
39
|
+
def self.names
|
|
40
|
+
@_hash = {} if @_hash.nil?
|
|
41
|
+
@_hash['audits'] = 'Audits'
|
|
42
|
+
@_hash['current_page'] = 'CurrentPage'
|
|
43
|
+
@_hash['row_count'] = 'RowCount'
|
|
44
|
+
@_hash['total_pages'] = 'TotalPages'
|
|
45
|
+
@_hash['error'] = 'Error'
|
|
46
|
+
@_hash['request_id'] = 'RequestId'
|
|
47
|
+
@_hash
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# An array for optional fields
|
|
51
|
+
def self.optionals
|
|
52
|
+
%w[
|
|
53
|
+
audits
|
|
54
|
+
current_page
|
|
55
|
+
row_count
|
|
56
|
+
total_pages
|
|
57
|
+
error
|
|
58
|
+
request_id
|
|
59
|
+
]
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# An array for nullable fields
|
|
63
|
+
def self.nullables
|
|
64
|
+
[]
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def initialize(audits = SKIP,
|
|
68
|
+
current_page = SKIP,
|
|
69
|
+
row_count = SKIP,
|
|
70
|
+
total_pages = SKIP,
|
|
71
|
+
error = SKIP,
|
|
72
|
+
request_id = SKIP)
|
|
73
|
+
@audits = audits unless audits == SKIP
|
|
74
|
+
@current_page = current_page unless current_page == SKIP
|
|
75
|
+
@row_count = row_count unless row_count == SKIP
|
|
76
|
+
@total_pages = total_pages unless total_pages == SKIP
|
|
77
|
+
@error = error unless error == SKIP
|
|
78
|
+
@request_id = request_id unless request_id == SKIP
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Creates an instance of the object from a hash.
|
|
82
|
+
def self.from_hash(hash)
|
|
83
|
+
return nil unless hash
|
|
84
|
+
|
|
85
|
+
# Extract variables from the hash.
|
|
86
|
+
# Parameter is an array, so we need to iterate through it
|
|
87
|
+
audits = nil
|
|
88
|
+
unless hash['Audits'].nil?
|
|
89
|
+
audits = []
|
|
90
|
+
hash['Audits'].each do |structure|
|
|
91
|
+
audits << (AuditResponseAuditsItems.from_hash(structure) if structure)
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
audits = SKIP unless hash.key?('Audits')
|
|
96
|
+
current_page = hash.key?('CurrentPage') ? hash['CurrentPage'] : SKIP
|
|
97
|
+
row_count = hash.key?('RowCount') ? hash['RowCount'] : SKIP
|
|
98
|
+
total_pages = hash.key?('TotalPages') ? hash['TotalPages'] : SKIP
|
|
99
|
+
error = ErrorStatus.from_hash(hash['Error']) if hash['Error']
|
|
100
|
+
request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
|
|
101
|
+
|
|
102
|
+
# Create object from extracted values.
|
|
103
|
+
AuditResponse.new(audits,
|
|
104
|
+
current_page,
|
|
105
|
+
row_count,
|
|
106
|
+
total_pages,
|
|
107
|
+
error,
|
|
108
|
+
request_id)
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|