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,110 @@
|
|
|
1
|
+
# shell_data_reporting_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ShellDataReportingApIs
|
|
7
|
+
# RecentTransactionsResponse Model.
|
|
8
|
+
class RecentTransactionsResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# RequestID is unique identifier value that is attached to requests and
|
|
13
|
+
# messages that allow reference to a particular transaction or event chain.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :request_id
|
|
16
|
+
|
|
17
|
+
# status of the API call
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :status
|
|
20
|
+
|
|
21
|
+
# CurrentPage
|
|
22
|
+
# @return [Integer]
|
|
23
|
+
attr_accessor :page
|
|
24
|
+
|
|
25
|
+
# RowCount
|
|
26
|
+
# @return [Integer]
|
|
27
|
+
attr_accessor :row_count
|
|
28
|
+
|
|
29
|
+
# TotalPages
|
|
30
|
+
# @return [Integer]
|
|
31
|
+
attr_accessor :total_pages
|
|
32
|
+
|
|
33
|
+
# API Response
|
|
34
|
+
# @return [Array[RecentTransactions]]
|
|
35
|
+
attr_accessor :data
|
|
36
|
+
|
|
37
|
+
# A mapping from model property names to API property names.
|
|
38
|
+
def self.names
|
|
39
|
+
@_hash = {} if @_hash.nil?
|
|
40
|
+
@_hash['request_id'] = 'RequestId'
|
|
41
|
+
@_hash['status'] = 'Status'
|
|
42
|
+
@_hash['page'] = 'Page'
|
|
43
|
+
@_hash['row_count'] = 'RowCount'
|
|
44
|
+
@_hash['total_pages'] = 'TotalPages'
|
|
45
|
+
@_hash['data'] = 'Data'
|
|
46
|
+
@_hash
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for optional fields
|
|
50
|
+
def self.optionals
|
|
51
|
+
%w[
|
|
52
|
+
request_id
|
|
53
|
+
status
|
|
54
|
+
page
|
|
55
|
+
row_count
|
|
56
|
+
total_pages
|
|
57
|
+
data
|
|
58
|
+
]
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# An array for nullable fields
|
|
62
|
+
def self.nullables
|
|
63
|
+
[]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def initialize(request_id = SKIP,
|
|
67
|
+
status = SKIP,
|
|
68
|
+
page = SKIP,
|
|
69
|
+
row_count = SKIP,
|
|
70
|
+
total_pages = SKIP,
|
|
71
|
+
data = SKIP)
|
|
72
|
+
@request_id = request_id unless request_id == SKIP
|
|
73
|
+
@status = status unless status == SKIP
|
|
74
|
+
@page = page unless page == SKIP
|
|
75
|
+
@row_count = row_count unless row_count == SKIP
|
|
76
|
+
@total_pages = total_pages unless total_pages == SKIP
|
|
77
|
+
@data = data unless data == SKIP
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Creates an instance of the object from a hash.
|
|
81
|
+
def self.from_hash(hash)
|
|
82
|
+
return nil unless hash
|
|
83
|
+
|
|
84
|
+
# Extract variables from the hash.
|
|
85
|
+
request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
|
|
86
|
+
status = hash.key?('Status') ? hash['Status'] : SKIP
|
|
87
|
+
page = hash.key?('Page') ? hash['Page'] : SKIP
|
|
88
|
+
row_count = hash.key?('RowCount') ? hash['RowCount'] : SKIP
|
|
89
|
+
total_pages = hash.key?('TotalPages') ? hash['TotalPages'] : SKIP
|
|
90
|
+
# Parameter is an array, so we need to iterate through it
|
|
91
|
+
data = nil
|
|
92
|
+
unless hash['Data'].nil?
|
|
93
|
+
data = []
|
|
94
|
+
hash['Data'].each do |structure|
|
|
95
|
+
data << (RecentTransactions.from_hash(structure) if structure)
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
data = SKIP unless hash.key?('Data')
|
|
100
|
+
|
|
101
|
+
# Create object from extracted values.
|
|
102
|
+
RecentTransactionsResponse.new(request_id,
|
|
103
|
+
status,
|
|
104
|
+
page,
|
|
105
|
+
row_count,
|
|
106
|
+
total_pages,
|
|
107
|
+
data)
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
# Role Model.
|
|
8
|
+
class Role < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Role Name of the user
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :role_name
|
|
15
|
+
|
|
16
|
+
# Whether the role is an administrator.
|
|
17
|
+
# @return [TrueClass | FalseClass]
|
|
18
|
+
attr_accessor :is_customer_admin
|
|
19
|
+
|
|
20
|
+
# Whether the role is a customer user.
|
|
21
|
+
# @return [TrueClass | FalseClass]
|
|
22
|
+
attr_accessor :is_customer_user
|
|
23
|
+
|
|
24
|
+
# True if the role is Shell user, else false.
|
|
25
|
+
# @return [TrueClass | FalseClass]
|
|
26
|
+
attr_accessor :is_shell_admin
|
|
27
|
+
|
|
28
|
+
# True/False.
|
|
29
|
+
# True if the role is Service accounts, else false.
|
|
30
|
+
# @return [TrueClass | FalseClass]
|
|
31
|
+
attr_accessor :is_service_account
|
|
32
|
+
|
|
33
|
+
# True/False.
|
|
34
|
+
# True, if the role allows user administration, else false.
|
|
35
|
+
# @return [TrueClass | FalseClass]
|
|
36
|
+
attr_accessor :is_user_admin
|
|
37
|
+
|
|
38
|
+
# A mapping from model property names to API property names.
|
|
39
|
+
def self.names
|
|
40
|
+
@_hash = {} if @_hash.nil?
|
|
41
|
+
@_hash['role_name'] = 'RoleName'
|
|
42
|
+
@_hash['is_customer_admin'] = 'IsCustomerAdmin'
|
|
43
|
+
@_hash['is_customer_user'] = 'IsCustomerUser'
|
|
44
|
+
@_hash['is_shell_admin'] = 'IsShellAdmin'
|
|
45
|
+
@_hash['is_service_account'] = 'IsServiceAccount'
|
|
46
|
+
@_hash['is_user_admin'] = 'IsUserAdmin'
|
|
47
|
+
@_hash
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# An array for optional fields
|
|
51
|
+
def self.optionals
|
|
52
|
+
%w[
|
|
53
|
+
role_name
|
|
54
|
+
is_customer_admin
|
|
55
|
+
is_customer_user
|
|
56
|
+
is_shell_admin
|
|
57
|
+
is_service_account
|
|
58
|
+
is_user_admin
|
|
59
|
+
]
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# An array for nullable fields
|
|
63
|
+
def self.nullables
|
|
64
|
+
[]
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def initialize(role_name = SKIP,
|
|
68
|
+
is_customer_admin = true,
|
|
69
|
+
is_customer_user = false,
|
|
70
|
+
is_shell_admin = false,
|
|
71
|
+
is_service_account = false,
|
|
72
|
+
is_user_admin = true)
|
|
73
|
+
@role_name = role_name unless role_name == SKIP
|
|
74
|
+
@is_customer_admin = is_customer_admin unless is_customer_admin == SKIP
|
|
75
|
+
@is_customer_user = is_customer_user unless is_customer_user == SKIP
|
|
76
|
+
@is_shell_admin = is_shell_admin unless is_shell_admin == SKIP
|
|
77
|
+
@is_service_account = is_service_account unless is_service_account == SKIP
|
|
78
|
+
@is_user_admin = is_user_admin unless is_user_admin == 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
|
+
role_name = hash.key?('RoleName') ? hash['RoleName'] : SKIP
|
|
87
|
+
is_customer_admin = hash['IsCustomerAdmin'] ||= true
|
|
88
|
+
is_customer_user = hash['IsCustomerUser'] ||= false
|
|
89
|
+
is_shell_admin = hash['IsShellAdmin'] ||= false
|
|
90
|
+
is_service_account = hash['IsServiceAccount'] ||= false
|
|
91
|
+
is_user_admin = hash['IsUserAdmin'] ||= true
|
|
92
|
+
|
|
93
|
+
# Create object from extracted values.
|
|
94
|
+
Role.new(role_name,
|
|
95
|
+
is_customer_admin,
|
|
96
|
+
is_customer_user,
|
|
97
|
+
is_shell_admin,
|
|
98
|
+
is_service_account,
|
|
99
|
+
is_user_admin)
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
@@ -0,0 +1,269 @@
|
|
|
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
|
+
# SearchDocReq Model.
|
|
8
|
+
class SearchDocReq < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Payer Number of the selected payer.
|
|
13
|
+
# Mandatory
|
|
14
|
+
# Example: GB000000123
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :payer_number
|
|
17
|
+
|
|
18
|
+
# Account Number of the customer.
|
|
19
|
+
# Mandatory for customer users else optional.
|
|
20
|
+
# This input is a search criterion, if given.
|
|
21
|
+
# Example: GB000000123
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :account_number
|
|
24
|
+
|
|
25
|
+
# Account Number of the customers.
|
|
26
|
+
# optional.
|
|
27
|
+
# This input is a search criterion, if given.
|
|
28
|
+
# Example: [“GB00000123”, “GB00000225”]
|
|
29
|
+
# @return [Array[String]]
|
|
30
|
+
attr_accessor :account_number_list
|
|
31
|
+
|
|
32
|
+
# Invoice number.
|
|
33
|
+
# Optional if InvoiceNumberList is passed else Mandatory
|
|
34
|
+
# This input is a search criterion, if given.
|
|
35
|
+
# Example: 0123456789
|
|
36
|
+
# @return [String]
|
|
37
|
+
attr_accessor :invoice_number
|
|
38
|
+
|
|
39
|
+
# List of Invoice number.
|
|
40
|
+
# Optional if InvoiceNumber is passed else Mandatory
|
|
41
|
+
# Example: [“0123456789”, “0123459799”]
|
|
42
|
+
# @return [Array[String]]
|
|
43
|
+
attr_accessor :invoice_number_list
|
|
44
|
+
|
|
45
|
+
# The status of the invoices
|
|
46
|
+
# Optional
|
|
47
|
+
# One of the following values:
|
|
48
|
+
# • NEW
|
|
49
|
+
# • VIEWED
|
|
50
|
+
# • DOWNLOADED
|
|
51
|
+
# • RESTORED
|
|
52
|
+
# @return [String]
|
|
53
|
+
attr_accessor :invoice_status
|
|
54
|
+
|
|
55
|
+
# Invoice Issuing Date Range/From
|
|
56
|
+
# Optional
|
|
57
|
+
# Format: yyyy/MM/dd
|
|
58
|
+
# @return [String]
|
|
59
|
+
attr_accessor :issuing_date_from
|
|
60
|
+
|
|
61
|
+
# Invoice Issuing Date Range/To
|
|
62
|
+
# Optional
|
|
63
|
+
# Format: yyyy/MM/dd
|
|
64
|
+
# @return [String]
|
|
65
|
+
attr_accessor :issuing_date_to
|
|
66
|
+
|
|
67
|
+
# Invoice Due Date Range/From
|
|
68
|
+
# Optional
|
|
69
|
+
# Format: yyyy/MM/dd
|
|
70
|
+
# @return [String]
|
|
71
|
+
attr_accessor :due_date_from
|
|
72
|
+
|
|
73
|
+
# Invoice Due Date Range/To
|
|
74
|
+
# Optional
|
|
75
|
+
# Format: yyyy/MM/dd
|
|
76
|
+
# @return [String]
|
|
77
|
+
attr_accessor :due_date_to
|
|
78
|
+
|
|
79
|
+
# Gross amount of the bill.
|
|
80
|
+
# Optional
|
|
81
|
+
# @return [String]
|
|
82
|
+
attr_accessor :gross_amount
|
|
83
|
+
|
|
84
|
+
# Criteria on the gross amount, for instance use GT when to retrieve the
|
|
85
|
+
# invoices for that gross amount is greater than the given amount on
|
|
86
|
+
# GrossAmount parameter above.
|
|
87
|
+
# Optional
|
|
88
|
+
# This parameter will be ignored if GrossAmount parameter is not set.
|
|
89
|
+
# One of the following values:
|
|
90
|
+
# • LT (Less Than)
|
|
91
|
+
# • LE (Lesser or Equal)
|
|
92
|
+
# • EQ (equal)
|
|
93
|
+
# • GE (Greater or equal)
|
|
94
|
+
# • GT (Greater than)
|
|
95
|
+
# @return [String]
|
|
96
|
+
attr_accessor :gross_amount_operator
|
|
97
|
+
|
|
98
|
+
# Document Type
|
|
99
|
+
# Optional
|
|
100
|
+
# One of the following values:
|
|
101
|
+
# • NAT (National)
|
|
102
|
+
# • INT (International)
|
|
103
|
+
# • SOA (Statement of Account)
|
|
104
|
+
# @return [String]
|
|
105
|
+
attr_accessor :document_type
|
|
106
|
+
|
|
107
|
+
# Two letter ISO country code.
|
|
108
|
+
# @return [String]
|
|
109
|
+
attr_accessor :vat_issuer_country
|
|
110
|
+
|
|
111
|
+
# Collecting Company Code of the selected payer.
|
|
112
|
+
# Mandatory
|
|
113
|
+
# Example:
|
|
114
|
+
# 86-Philippines
|
|
115
|
+
# 5-UK
|
|
116
|
+
# @return [Array[String]]
|
|
117
|
+
attr_accessor :sorty_by
|
|
118
|
+
|
|
119
|
+
# Collecting Company Code of the selected payer.
|
|
120
|
+
# Mandatory
|
|
121
|
+
# Example:
|
|
122
|
+
# 86-Philippines
|
|
123
|
+
# 5-UK
|
|
124
|
+
# @return [Integer]
|
|
125
|
+
attr_accessor :col_co_code
|
|
126
|
+
|
|
127
|
+
# A mapping from model property names to API property names.
|
|
128
|
+
def self.names
|
|
129
|
+
@_hash = {} if @_hash.nil?
|
|
130
|
+
@_hash['payer_number'] = 'PayerNumber'
|
|
131
|
+
@_hash['account_number'] = 'AccountNumber'
|
|
132
|
+
@_hash['account_number_list'] = 'AccountNumberList'
|
|
133
|
+
@_hash['invoice_number'] = 'InvoiceNumber'
|
|
134
|
+
@_hash['invoice_number_list'] = 'InvoiceNumberList'
|
|
135
|
+
@_hash['invoice_status'] = 'InvoiceStatus'
|
|
136
|
+
@_hash['issuing_date_from'] = 'IssuingDateFrom'
|
|
137
|
+
@_hash['issuing_date_to'] = 'IssuingDateTo'
|
|
138
|
+
@_hash['due_date_from'] = 'DueDateFrom'
|
|
139
|
+
@_hash['due_date_to'] = 'DueDateTo'
|
|
140
|
+
@_hash['gross_amount'] = 'GrossAmount'
|
|
141
|
+
@_hash['gross_amount_operator'] = 'GrossAmountOperator'
|
|
142
|
+
@_hash['document_type'] = 'DocumentType'
|
|
143
|
+
@_hash['vat_issuer_country'] = 'VATIssuerCountry'
|
|
144
|
+
@_hash['sorty_by'] = 'SortyBy'
|
|
145
|
+
@_hash['col_co_code'] = 'ColCoCode'
|
|
146
|
+
@_hash
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# An array for optional fields
|
|
150
|
+
def self.optionals
|
|
151
|
+
%w[
|
|
152
|
+
account_number
|
|
153
|
+
account_number_list
|
|
154
|
+
invoice_number
|
|
155
|
+
invoice_number_list
|
|
156
|
+
invoice_status
|
|
157
|
+
issuing_date_from
|
|
158
|
+
issuing_date_to
|
|
159
|
+
due_date_from
|
|
160
|
+
due_date_to
|
|
161
|
+
gross_amount
|
|
162
|
+
gross_amount_operator
|
|
163
|
+
document_type
|
|
164
|
+
vat_issuer_country
|
|
165
|
+
sorty_by
|
|
166
|
+
]
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# An array for nullable fields
|
|
170
|
+
def self.nullables
|
|
171
|
+
%w[
|
|
172
|
+
payer_number
|
|
173
|
+
account_number
|
|
174
|
+
invoice_number
|
|
175
|
+
invoice_status
|
|
176
|
+
issuing_date_from
|
|
177
|
+
issuing_date_to
|
|
178
|
+
due_date_from
|
|
179
|
+
due_date_to
|
|
180
|
+
gross_amount
|
|
181
|
+
gross_amount_operator
|
|
182
|
+
document_type
|
|
183
|
+
vat_issuer_country
|
|
184
|
+
col_co_code
|
|
185
|
+
]
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
def initialize(payer_number = nil,
|
|
189
|
+
col_co_code = nil,
|
|
190
|
+
account_number = SKIP,
|
|
191
|
+
account_number_list = SKIP,
|
|
192
|
+
invoice_number = SKIP,
|
|
193
|
+
invoice_number_list = SKIP,
|
|
194
|
+
invoice_status = SKIP,
|
|
195
|
+
issuing_date_from = SKIP,
|
|
196
|
+
issuing_date_to = SKIP,
|
|
197
|
+
due_date_from = SKIP,
|
|
198
|
+
due_date_to = SKIP,
|
|
199
|
+
gross_amount = SKIP,
|
|
200
|
+
gross_amount_operator = SKIP,
|
|
201
|
+
document_type = SKIP,
|
|
202
|
+
vat_issuer_country = SKIP,
|
|
203
|
+
sorty_by = SKIP)
|
|
204
|
+
@payer_number = payer_number
|
|
205
|
+
@account_number = account_number unless account_number == SKIP
|
|
206
|
+
@account_number_list = account_number_list unless account_number_list == SKIP
|
|
207
|
+
@invoice_number = invoice_number unless invoice_number == SKIP
|
|
208
|
+
@invoice_number_list = invoice_number_list unless invoice_number_list == SKIP
|
|
209
|
+
@invoice_status = invoice_status unless invoice_status == SKIP
|
|
210
|
+
@issuing_date_from = issuing_date_from unless issuing_date_from == SKIP
|
|
211
|
+
@issuing_date_to = issuing_date_to unless issuing_date_to == SKIP
|
|
212
|
+
@due_date_from = due_date_from unless due_date_from == SKIP
|
|
213
|
+
@due_date_to = due_date_to unless due_date_to == SKIP
|
|
214
|
+
@gross_amount = gross_amount unless gross_amount == SKIP
|
|
215
|
+
@gross_amount_operator = gross_amount_operator unless gross_amount_operator == SKIP
|
|
216
|
+
@document_type = document_type unless document_type == SKIP
|
|
217
|
+
@vat_issuer_country = vat_issuer_country unless vat_issuer_country == SKIP
|
|
218
|
+
@sorty_by = sorty_by unless sorty_by == SKIP
|
|
219
|
+
@col_co_code = col_co_code
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Creates an instance of the object from a hash.
|
|
223
|
+
def self.from_hash(hash)
|
|
224
|
+
return nil unless hash
|
|
225
|
+
|
|
226
|
+
# Extract variables from the hash.
|
|
227
|
+
payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : nil
|
|
228
|
+
col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : nil
|
|
229
|
+
account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
|
|
230
|
+
account_number_list =
|
|
231
|
+
hash.key?('AccountNumberList') ? hash['AccountNumberList'] : SKIP
|
|
232
|
+
invoice_number = hash.key?('InvoiceNumber') ? hash['InvoiceNumber'] : SKIP
|
|
233
|
+
invoice_number_list =
|
|
234
|
+
hash.key?('InvoiceNumberList') ? hash['InvoiceNumberList'] : SKIP
|
|
235
|
+
invoice_status = hash.key?('InvoiceStatus') ? hash['InvoiceStatus'] : SKIP
|
|
236
|
+
issuing_date_from =
|
|
237
|
+
hash.key?('IssuingDateFrom') ? hash['IssuingDateFrom'] : SKIP
|
|
238
|
+
issuing_date_to =
|
|
239
|
+
hash.key?('IssuingDateTo') ? hash['IssuingDateTo'] : SKIP
|
|
240
|
+
due_date_from = hash.key?('DueDateFrom') ? hash['DueDateFrom'] : SKIP
|
|
241
|
+
due_date_to = hash.key?('DueDateTo') ? hash['DueDateTo'] : SKIP
|
|
242
|
+
gross_amount = hash.key?('GrossAmount') ? hash['GrossAmount'] : SKIP
|
|
243
|
+
gross_amount_operator =
|
|
244
|
+
hash.key?('GrossAmountOperator') ? hash['GrossAmountOperator'] : SKIP
|
|
245
|
+
document_type = hash.key?('DocumentType') ? hash['DocumentType'] : SKIP
|
|
246
|
+
vat_issuer_country =
|
|
247
|
+
hash.key?('VATIssuerCountry') ? hash['VATIssuerCountry'] : SKIP
|
|
248
|
+
sorty_by = hash.key?('SortyBy') ? hash['SortyBy'] : SKIP
|
|
249
|
+
|
|
250
|
+
# Create object from extracted values.
|
|
251
|
+
SearchDocReq.new(payer_number,
|
|
252
|
+
col_co_code,
|
|
253
|
+
account_number,
|
|
254
|
+
account_number_list,
|
|
255
|
+
invoice_number,
|
|
256
|
+
invoice_number_list,
|
|
257
|
+
invoice_status,
|
|
258
|
+
issuing_date_from,
|
|
259
|
+
issuing_date_to,
|
|
260
|
+
due_date_from,
|
|
261
|
+
due_date_to,
|
|
262
|
+
gross_amount,
|
|
263
|
+
gross_amount_operator,
|
|
264
|
+
document_type,
|
|
265
|
+
vat_issuer_country,
|
|
266
|
+
sorty_by)
|
|
267
|
+
end
|
|
268
|
+
end
|
|
269
|
+
end
|
|
@@ -0,0 +1,204 @@
|
|
|
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
|
+
# SearchDocumentsInvoice Model.
|
|
8
|
+
class SearchDocumentsInvoice < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Unique Invoice Reference id of the invoice for downloading the zip file
|
|
13
|
+
# containing PDF and proofing elements.
|
|
14
|
+
# Example: 123456
|
|
15
|
+
# @return [Integer]
|
|
16
|
+
attr_accessor :document_reference
|
|
17
|
+
|
|
18
|
+
# Payment customer number.
|
|
19
|
+
# Example: GB000000123
|
|
20
|
+
# @return [String]
|
|
21
|
+
attr_accessor :invoice_number
|
|
22
|
+
|
|
23
|
+
# Customer payer name
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :payer_name
|
|
26
|
+
|
|
27
|
+
# Account Number
|
|
28
|
+
# Example: GB99215176
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :account_number
|
|
31
|
+
|
|
32
|
+
# Invoice account name
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :account_name
|
|
35
|
+
|
|
36
|
+
# Document type
|
|
37
|
+
# String containing one of the following values:
|
|
38
|
+
# • NAT (National)
|
|
39
|
+
# • INT (International)
|
|
40
|
+
# • SOA (Statement of Account)
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :document_type
|
|
43
|
+
|
|
44
|
+
# Included tax amount in the invoice
|
|
45
|
+
# @return [Float]
|
|
46
|
+
attr_accessor :gross_amount
|
|
47
|
+
|
|
48
|
+
# Included tax amount in the invoice
|
|
49
|
+
# @return [Float]
|
|
50
|
+
attr_accessor :net_amount
|
|
51
|
+
|
|
52
|
+
# Included tax amount in the invoice
|
|
53
|
+
# @return [Float]
|
|
54
|
+
attr_accessor :tax_amount
|
|
55
|
+
|
|
56
|
+
# Included tax amount in the invoice
|
|
57
|
+
# @return [String]
|
|
58
|
+
attr_accessor :currency_code
|
|
59
|
+
|
|
60
|
+
# Included tax amount in the invoice
|
|
61
|
+
# @return [String]
|
|
62
|
+
attr_accessor :invoice_status
|
|
63
|
+
|
|
64
|
+
# Included tax amount in the invoice
|
|
65
|
+
# @return [String]
|
|
66
|
+
attr_accessor :invoice_date
|
|
67
|
+
|
|
68
|
+
# Included tax amount in the invoice
|
|
69
|
+
# @return [String]
|
|
70
|
+
attr_accessor :due_date
|
|
71
|
+
|
|
72
|
+
# Included tax amount in the invoice
|
|
73
|
+
# @return [String]
|
|
74
|
+
attr_accessor :vat_country_iso_code
|
|
75
|
+
|
|
76
|
+
# A mapping from model property names to API property names.
|
|
77
|
+
def self.names
|
|
78
|
+
@_hash = {} if @_hash.nil?
|
|
79
|
+
@_hash['document_reference'] = 'DocumentReference'
|
|
80
|
+
@_hash['invoice_number'] = 'InvoiceNumber'
|
|
81
|
+
@_hash['payer_name'] = 'PayerName'
|
|
82
|
+
@_hash['account_number'] = 'AccountNumber'
|
|
83
|
+
@_hash['account_name'] = 'AccountName'
|
|
84
|
+
@_hash['document_type'] = 'DocumentType'
|
|
85
|
+
@_hash['gross_amount'] = 'GrossAmount'
|
|
86
|
+
@_hash['net_amount'] = 'NetAmount'
|
|
87
|
+
@_hash['tax_amount'] = 'TaxAmount'
|
|
88
|
+
@_hash['currency_code'] = 'CurrencyCode'
|
|
89
|
+
@_hash['invoice_status'] = 'InvoiceStatus'
|
|
90
|
+
@_hash['invoice_date'] = 'InvoiceDate'
|
|
91
|
+
@_hash['due_date'] = 'DueDate'
|
|
92
|
+
@_hash['vat_country_iso_code'] = 'VATCountryISOCode'
|
|
93
|
+
@_hash
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# An array for optional fields
|
|
97
|
+
def self.optionals
|
|
98
|
+
%w[
|
|
99
|
+
document_reference
|
|
100
|
+
invoice_number
|
|
101
|
+
payer_name
|
|
102
|
+
account_number
|
|
103
|
+
account_name
|
|
104
|
+
document_type
|
|
105
|
+
gross_amount
|
|
106
|
+
net_amount
|
|
107
|
+
tax_amount
|
|
108
|
+
currency_code
|
|
109
|
+
invoice_status
|
|
110
|
+
invoice_date
|
|
111
|
+
due_date
|
|
112
|
+
vat_country_iso_code
|
|
113
|
+
]
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# An array for nullable fields
|
|
117
|
+
def self.nullables
|
|
118
|
+
%w[
|
|
119
|
+
invoice_number
|
|
120
|
+
payer_name
|
|
121
|
+
account_number
|
|
122
|
+
account_name
|
|
123
|
+
document_type
|
|
124
|
+
gross_amount
|
|
125
|
+
net_amount
|
|
126
|
+
tax_amount
|
|
127
|
+
currency_code
|
|
128
|
+
invoice_status
|
|
129
|
+
invoice_date
|
|
130
|
+
due_date
|
|
131
|
+
vat_country_iso_code
|
|
132
|
+
]
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
def initialize(document_reference = SKIP,
|
|
136
|
+
invoice_number = SKIP,
|
|
137
|
+
payer_name = SKIP,
|
|
138
|
+
account_number = SKIP,
|
|
139
|
+
account_name = SKIP,
|
|
140
|
+
document_type = SKIP,
|
|
141
|
+
gross_amount = SKIP,
|
|
142
|
+
net_amount = SKIP,
|
|
143
|
+
tax_amount = SKIP,
|
|
144
|
+
currency_code = SKIP,
|
|
145
|
+
invoice_status = SKIP,
|
|
146
|
+
invoice_date = SKIP,
|
|
147
|
+
due_date = SKIP,
|
|
148
|
+
vat_country_iso_code = SKIP)
|
|
149
|
+
@document_reference = document_reference unless document_reference == SKIP
|
|
150
|
+
@invoice_number = invoice_number unless invoice_number == SKIP
|
|
151
|
+
@payer_name = payer_name unless payer_name == SKIP
|
|
152
|
+
@account_number = account_number unless account_number == SKIP
|
|
153
|
+
@account_name = account_name unless account_name == SKIP
|
|
154
|
+
@document_type = document_type unless document_type == SKIP
|
|
155
|
+
@gross_amount = gross_amount unless gross_amount == SKIP
|
|
156
|
+
@net_amount = net_amount unless net_amount == SKIP
|
|
157
|
+
@tax_amount = tax_amount unless tax_amount == SKIP
|
|
158
|
+
@currency_code = currency_code unless currency_code == SKIP
|
|
159
|
+
@invoice_status = invoice_status unless invoice_status == SKIP
|
|
160
|
+
@invoice_date = invoice_date unless invoice_date == SKIP
|
|
161
|
+
@due_date = due_date unless due_date == SKIP
|
|
162
|
+
@vat_country_iso_code = vat_country_iso_code unless vat_country_iso_code == SKIP
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Creates an instance of the object from a hash.
|
|
166
|
+
def self.from_hash(hash)
|
|
167
|
+
return nil unless hash
|
|
168
|
+
|
|
169
|
+
# Extract variables from the hash.
|
|
170
|
+
document_reference =
|
|
171
|
+
hash.key?('DocumentReference') ? hash['DocumentReference'] : SKIP
|
|
172
|
+
invoice_number = hash.key?('InvoiceNumber') ? hash['InvoiceNumber'] : SKIP
|
|
173
|
+
payer_name = hash.key?('PayerName') ? hash['PayerName'] : SKIP
|
|
174
|
+
account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
|
|
175
|
+
account_name = hash.key?('AccountName') ? hash['AccountName'] : SKIP
|
|
176
|
+
document_type = hash.key?('DocumentType') ? hash['DocumentType'] : SKIP
|
|
177
|
+
gross_amount = hash.key?('GrossAmount') ? hash['GrossAmount'] : SKIP
|
|
178
|
+
net_amount = hash.key?('NetAmount') ? hash['NetAmount'] : SKIP
|
|
179
|
+
tax_amount = hash.key?('TaxAmount') ? hash['TaxAmount'] : SKIP
|
|
180
|
+
currency_code = hash.key?('CurrencyCode') ? hash['CurrencyCode'] : SKIP
|
|
181
|
+
invoice_status = hash.key?('InvoiceStatus') ? hash['InvoiceStatus'] : SKIP
|
|
182
|
+
invoice_date = hash.key?('InvoiceDate') ? hash['InvoiceDate'] : SKIP
|
|
183
|
+
due_date = hash.key?('DueDate') ? hash['DueDate'] : SKIP
|
|
184
|
+
vat_country_iso_code =
|
|
185
|
+
hash.key?('VATCountryISOCode') ? hash['VATCountryISOCode'] : SKIP
|
|
186
|
+
|
|
187
|
+
# Create object from extracted values.
|
|
188
|
+
SearchDocumentsInvoice.new(document_reference,
|
|
189
|
+
invoice_number,
|
|
190
|
+
payer_name,
|
|
191
|
+
account_number,
|
|
192
|
+
account_name,
|
|
193
|
+
document_type,
|
|
194
|
+
gross_amount,
|
|
195
|
+
net_amount,
|
|
196
|
+
tax_amount,
|
|
197
|
+
currency_code,
|
|
198
|
+
invoice_status,
|
|
199
|
+
invoice_date,
|
|
200
|
+
due_date,
|
|
201
|
+
vat_country_iso_code)
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
end
|