data-and-reporting-sdk 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,197 @@
|
|
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
|
+
# FuelConsumptionRequest Model.
|
8
|
+
class FuelConsumptionRequest < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Collecting Company Id of the selected payer.
|
13
|
+
# Optional if ColCoCode is passed else Mandatory.
|
14
|
+
# Example:
|
15
|
+
# 1 for Philippines
|
16
|
+
# 5 for UK
|
17
|
+
# @return [Integer]
|
18
|
+
attr_accessor :col_co_id
|
19
|
+
|
20
|
+
# Collecting Company Code of the selected payer.
|
21
|
+
# Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia,
|
22
|
+
# Ukraine etc. It is optional for other countries if ColCoID is provided.
|
23
|
+
# Example:
|
24
|
+
# 86 for Philippines
|
25
|
+
# 5 for UK
|
26
|
+
# @return [Integer]
|
27
|
+
attr_accessor :col_co_code
|
28
|
+
|
29
|
+
# Payer Id of the selected payer.
|
30
|
+
# Optional if PayerNumber is passed else Mandatory
|
31
|
+
# @return [Integer]
|
32
|
+
attr_accessor :payer_id
|
33
|
+
|
34
|
+
# Payer Number of the selected payer.
|
35
|
+
# Optional if PayerId is passed else Mandatory
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :payer_number
|
38
|
+
|
39
|
+
# Payer Number of the selected payer.
|
40
|
+
# Optional if PayerId is passed else Mandatory
|
41
|
+
# @return [Array[Accounts]]
|
42
|
+
attr_accessor :accounts
|
43
|
+
|
44
|
+
# Card Group Id in GFN
|
45
|
+
# Optional
|
46
|
+
# Example: 200
|
47
|
+
# @return [Integer]
|
48
|
+
attr_accessor :card_group_id
|
49
|
+
|
50
|
+
# Card Group Name
|
51
|
+
# Optional
|
52
|
+
# This input is a search criterion, if given.
|
53
|
+
# @return [String]
|
54
|
+
attr_accessor :card_group_name
|
55
|
+
|
56
|
+
# Card Group Name
|
57
|
+
# Optional
|
58
|
+
# This input is a search criterion, if given.
|
59
|
+
# @return [Array[FuelConsumptionCard]]
|
60
|
+
attr_accessor :cards
|
61
|
+
|
62
|
+
# Transactions from Date
|
63
|
+
# Optional – ‘Period’ will be considered when this field is not provided.
|
64
|
+
# @return [String]
|
65
|
+
attr_accessor :from_date
|
66
|
+
|
67
|
+
# Transactions to Date
|
68
|
+
# Optional
|
69
|
+
# Format: yyyyMMdd
|
70
|
+
# @return [String]
|
71
|
+
attr_accessor :to_date
|
72
|
+
|
73
|
+
# Transactions Period. This is ignored when FromDate is supplied on the
|
74
|
+
# request
|
75
|
+
# Allowed values :
|
76
|
+
# 1. Last 7 Days
|
77
|
+
# 2. Last 30 Days
|
78
|
+
# 3. Last 90 Days
|
79
|
+
# Optional - When FromDate/ToDate and Period are not provided, ‘Last 7 Days’
|
80
|
+
# value is considered as default Period.
|
81
|
+
# @return [Integer]
|
82
|
+
attr_accessor :period
|
83
|
+
|
84
|
+
# A mapping from model property names to API property names.
|
85
|
+
def self.names
|
86
|
+
@_hash = {} if @_hash.nil?
|
87
|
+
@_hash['col_co_id'] = 'ColCoId'
|
88
|
+
@_hash['col_co_code'] = 'ColCoCode'
|
89
|
+
@_hash['payer_id'] = 'PayerId'
|
90
|
+
@_hash['payer_number'] = 'PayerNumber'
|
91
|
+
@_hash['accounts'] = 'Accounts'
|
92
|
+
@_hash['card_group_id'] = 'CardGroupId'
|
93
|
+
@_hash['card_group_name'] = 'CardGroupName'
|
94
|
+
@_hash['cards'] = 'Cards'
|
95
|
+
@_hash['from_date'] = 'FromDate'
|
96
|
+
@_hash['to_date'] = 'ToDate'
|
97
|
+
@_hash['period'] = 'Period'
|
98
|
+
@_hash
|
99
|
+
end
|
100
|
+
|
101
|
+
# An array for optional fields
|
102
|
+
def self.optionals
|
103
|
+
%w[
|
104
|
+
col_co_id
|
105
|
+
col_co_code
|
106
|
+
payer_id
|
107
|
+
payer_number
|
108
|
+
accounts
|
109
|
+
card_group_id
|
110
|
+
card_group_name
|
111
|
+
cards
|
112
|
+
from_date
|
113
|
+
to_date
|
114
|
+
period
|
115
|
+
]
|
116
|
+
end
|
117
|
+
|
118
|
+
# An array for nullable fields
|
119
|
+
def self.nullables
|
120
|
+
[]
|
121
|
+
end
|
122
|
+
|
123
|
+
def initialize(col_co_id = SKIP,
|
124
|
+
col_co_code = SKIP,
|
125
|
+
payer_id = SKIP,
|
126
|
+
payer_number = SKIP,
|
127
|
+
accounts = SKIP,
|
128
|
+
card_group_id = SKIP,
|
129
|
+
card_group_name = SKIP,
|
130
|
+
cards = SKIP,
|
131
|
+
from_date = SKIP,
|
132
|
+
to_date = SKIP,
|
133
|
+
period = SKIP)
|
134
|
+
@col_co_id = col_co_id unless col_co_id == SKIP
|
135
|
+
@col_co_code = col_co_code unless col_co_code == SKIP
|
136
|
+
@payer_id = payer_id unless payer_id == SKIP
|
137
|
+
@payer_number = payer_number unless payer_number == SKIP
|
138
|
+
@accounts = accounts unless accounts == SKIP
|
139
|
+
@card_group_id = card_group_id unless card_group_id == SKIP
|
140
|
+
@card_group_name = card_group_name unless card_group_name == SKIP
|
141
|
+
@cards = cards unless cards == SKIP
|
142
|
+
@from_date = from_date unless from_date == SKIP
|
143
|
+
@to_date = to_date unless to_date == SKIP
|
144
|
+
@period = period unless period == SKIP
|
145
|
+
end
|
146
|
+
|
147
|
+
# Creates an instance of the object from a hash.
|
148
|
+
def self.from_hash(hash)
|
149
|
+
return nil unless hash
|
150
|
+
|
151
|
+
# Extract variables from the hash.
|
152
|
+
col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
|
153
|
+
col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
|
154
|
+
payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
|
155
|
+
payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
|
156
|
+
# Parameter is an array, so we need to iterate through it
|
157
|
+
accounts = nil
|
158
|
+
unless hash['Accounts'].nil?
|
159
|
+
accounts = []
|
160
|
+
hash['Accounts'].each do |structure|
|
161
|
+
accounts << (Accounts.from_hash(structure) if structure)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
accounts = SKIP unless hash.key?('Accounts')
|
166
|
+
card_group_id = hash.key?('CardGroupId') ? hash['CardGroupId'] : SKIP
|
167
|
+
card_group_name =
|
168
|
+
hash.key?('CardGroupName') ? hash['CardGroupName'] : SKIP
|
169
|
+
# Parameter is an array, so we need to iterate through it
|
170
|
+
cards = nil
|
171
|
+
unless hash['Cards'].nil?
|
172
|
+
cards = []
|
173
|
+
hash['Cards'].each do |structure|
|
174
|
+
cards << (FuelConsumptionCard.from_hash(structure) if structure)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
cards = SKIP unless hash.key?('Cards')
|
179
|
+
from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
|
180
|
+
to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP
|
181
|
+
period = hash.key?('Period') ? hash['Period'] : SKIP
|
182
|
+
|
183
|
+
# Create object from extracted values.
|
184
|
+
FuelConsumptionRequest.new(col_co_id,
|
185
|
+
col_co_code,
|
186
|
+
payer_id,
|
187
|
+
payer_number,
|
188
|
+
accounts,
|
189
|
+
card_group_id,
|
190
|
+
card_group_name,
|
191
|
+
cards,
|
192
|
+
from_date,
|
193
|
+
to_date,
|
194
|
+
period)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
@@ -0,0 +1,79 @@
|
|
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
|
+
# FuelConsumptionResponse Model.
|
8
|
+
class FuelConsumptionResponse < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [Array[FuelConsumptionData]]
|
14
|
+
attr_accessor :fuel_consumption
|
15
|
+
|
16
|
+
# TODO: Write general description for this method
|
17
|
+
# @return [ErrorStatus]
|
18
|
+
attr_accessor :error
|
19
|
+
|
20
|
+
# API Request Id
|
21
|
+
# @return [String]
|
22
|
+
attr_accessor :request_id
|
23
|
+
|
24
|
+
# A mapping from model property names to API property names.
|
25
|
+
def self.names
|
26
|
+
@_hash = {} if @_hash.nil?
|
27
|
+
@_hash['fuel_consumption'] = 'FuelConsumption'
|
28
|
+
@_hash['error'] = 'Error'
|
29
|
+
@_hash['request_id'] = 'RequestId'
|
30
|
+
@_hash
|
31
|
+
end
|
32
|
+
|
33
|
+
# An array for optional fields
|
34
|
+
def self.optionals
|
35
|
+
%w[
|
36
|
+
fuel_consumption
|
37
|
+
error
|
38
|
+
request_id
|
39
|
+
]
|
40
|
+
end
|
41
|
+
|
42
|
+
# An array for nullable fields
|
43
|
+
def self.nullables
|
44
|
+
[]
|
45
|
+
end
|
46
|
+
|
47
|
+
def initialize(fuel_consumption = SKIP,
|
48
|
+
error = SKIP,
|
49
|
+
request_id = SKIP)
|
50
|
+
@fuel_consumption = fuel_consumption unless fuel_consumption == SKIP
|
51
|
+
@error = error unless error == SKIP
|
52
|
+
@request_id = request_id unless request_id == SKIP
|
53
|
+
end
|
54
|
+
|
55
|
+
# Creates an instance of the object from a hash.
|
56
|
+
def self.from_hash(hash)
|
57
|
+
return nil unless hash
|
58
|
+
|
59
|
+
# Extract variables from the hash.
|
60
|
+
# Parameter is an array, so we need to iterate through it
|
61
|
+
fuel_consumption = nil
|
62
|
+
unless hash['FuelConsumption'].nil?
|
63
|
+
fuel_consumption = []
|
64
|
+
hash['FuelConsumption'].each do |structure|
|
65
|
+
fuel_consumption << (FuelConsumptionData.from_hash(structure) if structure)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
fuel_consumption = SKIP unless hash.key?('FuelConsumption')
|
70
|
+
error = ErrorStatus.from_hash(hash['Error']) if hash['Error']
|
71
|
+
request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
|
72
|
+
|
73
|
+
# Create object from extracted values.
|
74
|
+
FuelConsumptionResponse.new(fuel_consumption,
|
75
|
+
error,
|
76
|
+
request_id)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,62 @@
|
|
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
|
+
# InvoiceDatesData Model.
|
8
|
+
class InvoiceDatesData < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# List of Invoice numbers.
|
13
|
+
# @return [Array[String]]
|
14
|
+
attr_accessor :invoice_numbers
|
15
|
+
|
16
|
+
# List of Invoicing dates.
|
17
|
+
# Format: yyyyMMdd
|
18
|
+
# @return [Array[String]]
|
19
|
+
attr_accessor :invoice_dates
|
20
|
+
|
21
|
+
# A mapping from model property names to API property names.
|
22
|
+
def self.names
|
23
|
+
@_hash = {} if @_hash.nil?
|
24
|
+
@_hash['invoice_numbers'] = 'InvoiceNumbers'
|
25
|
+
@_hash['invoice_dates'] = 'InvoiceDates'
|
26
|
+
@_hash
|
27
|
+
end
|
28
|
+
|
29
|
+
# An array for optional fields
|
30
|
+
def self.optionals
|
31
|
+
%w[
|
32
|
+
invoice_numbers
|
33
|
+
invoice_dates
|
34
|
+
]
|
35
|
+
end
|
36
|
+
|
37
|
+
# An array for nullable fields
|
38
|
+
def self.nullables
|
39
|
+
[]
|
40
|
+
end
|
41
|
+
|
42
|
+
def initialize(invoice_numbers = SKIP,
|
43
|
+
invoice_dates = SKIP)
|
44
|
+
@invoice_numbers = invoice_numbers unless invoice_numbers == SKIP
|
45
|
+
@invoice_dates = invoice_dates unless invoice_dates == SKIP
|
46
|
+
end
|
47
|
+
|
48
|
+
# Creates an instance of the object from a hash.
|
49
|
+
def self.from_hash(hash)
|
50
|
+
return nil unless hash
|
51
|
+
|
52
|
+
# Extract variables from the hash.
|
53
|
+
invoice_numbers =
|
54
|
+
hash.key?('InvoiceNumbers') ? hash['InvoiceNumbers'] : SKIP
|
55
|
+
invoice_dates = hash.key?('InvoiceDates') ? hash['InvoiceDates'] : SKIP
|
56
|
+
|
57
|
+
# Create object from extracted values.
|
58
|
+
InvoiceDatesData.new(invoice_numbers,
|
59
|
+
invoice_dates)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,50 @@
|
|
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
|
+
# InvoiceDatesRequest Model.
|
8
|
+
class InvoiceDatesRequest < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [InvoiceDatesRequestFilters]
|
14
|
+
attr_accessor :filters
|
15
|
+
|
16
|
+
# A mapping from model property names to API property names.
|
17
|
+
def self.names
|
18
|
+
@_hash = {} if @_hash.nil?
|
19
|
+
@_hash['filters'] = 'Filters'
|
20
|
+
@_hash
|
21
|
+
end
|
22
|
+
|
23
|
+
# An array for optional fields
|
24
|
+
def self.optionals
|
25
|
+
%w[
|
26
|
+
filters
|
27
|
+
]
|
28
|
+
end
|
29
|
+
|
30
|
+
# An array for nullable fields
|
31
|
+
def self.nullables
|
32
|
+
[]
|
33
|
+
end
|
34
|
+
|
35
|
+
def initialize(filters = SKIP)
|
36
|
+
@filters = filters unless filters == SKIP
|
37
|
+
end
|
38
|
+
|
39
|
+
# Creates an instance of the object from a hash.
|
40
|
+
def self.from_hash(hash)
|
41
|
+
return nil unless hash
|
42
|
+
|
43
|
+
# Extract variables from the hash.
|
44
|
+
filters = InvoiceDatesRequestFilters.from_hash(hash['Filters']) if hash['Filters']
|
45
|
+
|
46
|
+
# Create object from extracted values.
|
47
|
+
InvoiceDatesRequest.new(filters)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,146 @@
|
|
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
|
+
# InvoiceDatesRequestFilters Model.
|
8
|
+
class InvoiceDatesRequestFilters < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Collecting Company Code of the selected payer.
|
13
|
+
# Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia,
|
14
|
+
# Ukraine etc. It is optional for other countries if ColCoID is provided.
|
15
|
+
# Example:
|
16
|
+
# 86-Philippines
|
17
|
+
# 5-UK
|
18
|
+
# @return [Integer]
|
19
|
+
attr_accessor :col_co_code
|
20
|
+
|
21
|
+
# Collecting Company Id of the selected payer.
|
22
|
+
# Optional if ColCoCode is passed else Mandatory.
|
23
|
+
# Example:
|
24
|
+
# 1-Philippines
|
25
|
+
# 5-UK
|
26
|
+
# @return [Integer]
|
27
|
+
attr_accessor :col_co_id
|
28
|
+
|
29
|
+
# Payer Id of the selected payer.
|
30
|
+
# Optional if PayerNumber is passed else Mandatory
|
31
|
+
# @return [Integer]
|
32
|
+
attr_accessor :payer_id
|
33
|
+
|
34
|
+
# Payer Number of the selected payer.
|
35
|
+
# Optional if PayerId is passed else Mandatory
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :payer_number
|
38
|
+
|
39
|
+
# Invoice date searched from this date.
|
40
|
+
# Optional.
|
41
|
+
# This input is a search criterion, if given.
|
42
|
+
# Date format: yyyyMMdd
|
43
|
+
# @return [String]
|
44
|
+
attr_accessor :from_date
|
45
|
+
|
46
|
+
# Invoice date searched until this date.
|
47
|
+
# Optional.
|
48
|
+
# This input is a search criterion, if given.
|
49
|
+
# Date format: yyyyMMdd
|
50
|
+
# @return [String]
|
51
|
+
attr_accessor :to_date
|
52
|
+
|
53
|
+
# Invoice date searched until this date.
|
54
|
+
# Optional.
|
55
|
+
# This input is a search criterion, if given.
|
56
|
+
# Date format: yyyyMMdd
|
57
|
+
# @return [Array[Accounts]]
|
58
|
+
attr_accessor :accounts
|
59
|
+
|
60
|
+
# A mapping from model property names to API property names.
|
61
|
+
def self.names
|
62
|
+
@_hash = {} if @_hash.nil?
|
63
|
+
@_hash['col_co_code'] = 'ColCoCode'
|
64
|
+
@_hash['col_co_id'] = 'ColCoId'
|
65
|
+
@_hash['payer_id'] = 'PayerId'
|
66
|
+
@_hash['payer_number'] = 'PayerNumber'
|
67
|
+
@_hash['from_date'] = 'FromDate'
|
68
|
+
@_hash['to_date'] = 'ToDate'
|
69
|
+
@_hash['accounts'] = 'Accounts'
|
70
|
+
@_hash
|
71
|
+
end
|
72
|
+
|
73
|
+
# An array for optional fields
|
74
|
+
def self.optionals
|
75
|
+
%w[
|
76
|
+
col_co_code
|
77
|
+
col_co_id
|
78
|
+
payer_id
|
79
|
+
payer_number
|
80
|
+
from_date
|
81
|
+
to_date
|
82
|
+
accounts
|
83
|
+
]
|
84
|
+
end
|
85
|
+
|
86
|
+
# An array for nullable fields
|
87
|
+
def self.nullables
|
88
|
+
%w[
|
89
|
+
col_co_code
|
90
|
+
col_co_id
|
91
|
+
payer_id
|
92
|
+
payer_number
|
93
|
+
from_date
|
94
|
+
to_date
|
95
|
+
]
|
96
|
+
end
|
97
|
+
|
98
|
+
def initialize(col_co_code = SKIP,
|
99
|
+
col_co_id = SKIP,
|
100
|
+
payer_id = SKIP,
|
101
|
+
payer_number = SKIP,
|
102
|
+
from_date = SKIP,
|
103
|
+
to_date = SKIP,
|
104
|
+
accounts = SKIP)
|
105
|
+
@col_co_code = col_co_code unless col_co_code == SKIP
|
106
|
+
@col_co_id = col_co_id unless col_co_id == SKIP
|
107
|
+
@payer_id = payer_id unless payer_id == SKIP
|
108
|
+
@payer_number = payer_number unless payer_number == SKIP
|
109
|
+
@from_date = from_date unless from_date == SKIP
|
110
|
+
@to_date = to_date unless to_date == SKIP
|
111
|
+
@accounts = accounts unless accounts == SKIP
|
112
|
+
end
|
113
|
+
|
114
|
+
# Creates an instance of the object from a hash.
|
115
|
+
def self.from_hash(hash)
|
116
|
+
return nil unless hash
|
117
|
+
|
118
|
+
# Extract variables from the hash.
|
119
|
+
col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
|
120
|
+
col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
|
121
|
+
payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
|
122
|
+
payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
|
123
|
+
from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
|
124
|
+
to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP
|
125
|
+
# Parameter is an array, so we need to iterate through it
|
126
|
+
accounts = nil
|
127
|
+
unless hash['Accounts'].nil?
|
128
|
+
accounts = []
|
129
|
+
hash['Accounts'].each do |structure|
|
130
|
+
accounts << (Accounts.from_hash(structure) if structure)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
accounts = SKIP unless hash.key?('Accounts')
|
135
|
+
|
136
|
+
# Create object from extracted values.
|
137
|
+
InvoiceDatesRequestFilters.new(col_co_code,
|
138
|
+
col_co_id,
|
139
|
+
payer_id,
|
140
|
+
payer_number,
|
141
|
+
from_date,
|
142
|
+
to_date,
|
143
|
+
accounts)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
@@ -0,0 +1,80 @@
|
|
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
|
+
# InvoiceDatesResponseData Model.
|
8
|
+
class InvoiceDatesResponseData < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Unique request identifier passed from end user. This identifier helps in
|
13
|
+
# tracing a transaction
|
14
|
+
# @return [String]
|
15
|
+
attr_accessor :request_id
|
16
|
+
|
17
|
+
# Indicates overall status of the request. Allowed values: SUCCES, FAILED
|
18
|
+
# @return [String]
|
19
|
+
attr_accessor :status
|
20
|
+
|
21
|
+
# Indicates overall status of the request. Allowed values: SUCCES, FAILED
|
22
|
+
# @return [Array[InvoiceDatesData]]
|
23
|
+
attr_accessor :data
|
24
|
+
|
25
|
+
# A mapping from model property names to API property names.
|
26
|
+
def self.names
|
27
|
+
@_hash = {} if @_hash.nil?
|
28
|
+
@_hash['request_id'] = 'RequestId'
|
29
|
+
@_hash['status'] = 'Status'
|
30
|
+
@_hash['data'] = 'Data'
|
31
|
+
@_hash
|
32
|
+
end
|
33
|
+
|
34
|
+
# An array for optional fields
|
35
|
+
def self.optionals
|
36
|
+
%w[
|
37
|
+
request_id
|
38
|
+
status
|
39
|
+
data
|
40
|
+
]
|
41
|
+
end
|
42
|
+
|
43
|
+
# An array for nullable fields
|
44
|
+
def self.nullables
|
45
|
+
[]
|
46
|
+
end
|
47
|
+
|
48
|
+
def initialize(request_id = SKIP,
|
49
|
+
status = SKIP,
|
50
|
+
data = SKIP)
|
51
|
+
@request_id = request_id unless request_id == SKIP
|
52
|
+
@status = status unless status == SKIP
|
53
|
+
@data = data unless data == SKIP
|
54
|
+
end
|
55
|
+
|
56
|
+
# Creates an instance of the object from a hash.
|
57
|
+
def self.from_hash(hash)
|
58
|
+
return nil unless hash
|
59
|
+
|
60
|
+
# Extract variables from the hash.
|
61
|
+
request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
|
62
|
+
status = hash.key?('Status') ? hash['Status'] : SKIP
|
63
|
+
# Parameter is an array, so we need to iterate through it
|
64
|
+
data = nil
|
65
|
+
unless hash['Data'].nil?
|
66
|
+
data = []
|
67
|
+
hash['Data'].each do |structure|
|
68
|
+
data << (InvoiceDatesData.from_hash(structure) if structure)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
data = SKIP unless hash.key?('Data')
|
73
|
+
|
74
|
+
# Create object from extracted values.
|
75
|
+
InvoiceDatesResponseData.new(request_id,
|
76
|
+
status,
|
77
|
+
data)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|