apimatic-tql-sdk 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +148 -197
- data/bin/console +4 -4
- data/lib/freight_financials_webhook_ingestion_api/api_helper.rb +10 -0
- data/lib/freight_financials_webhook_ingestion_api/apis/assignments_api.rb +41 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/apis/base_api.rb +60 -60
- data/lib/freight_financials_webhook_ingestion_api/apis/documents_api.rb +73 -0
- data/lib/freight_financials_webhook_ingestion_api/apis/freight_audit_api.rb +54 -0
- data/lib/freight_financials_webhook_ingestion_api/apis/invoices_api.rb +107 -0
- data/lib/freight_financials_webhook_ingestion_api/apis/loads_api.rb +72 -0
- data/lib/freight_financials_webhook_ingestion_api/apis/rating_api.rb +45 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/client.rb +83 -97
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/configuration.rb +114 -126
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/exceptions/api_exception.rb +21 -21
- data/lib/{tql_otr_factoring_data_exchange/exceptions/problem_details_error_exception.rb → freight_financials_webhook_ingestion_api/exceptions/problem_details_exception.rb} +51 -41
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/http/api_response.rb +7 -7
- data/lib/freight_financials_webhook_ingestion_api/http/http_call_back.rb +10 -0
- data/lib/freight_financials_webhook_ingestion_api/http/http_method_enum.rb +10 -0
- data/lib/freight_financials_webhook_ingestion_api/http/http_request.rb +10 -0
- data/lib/freight_financials_webhook_ingestion_api/http/http_response.rb +10 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/http/proxy_settings.rb +6 -6
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/logging/configuration/api_logging_configuration.rb +6 -6
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/logging/sdk_logger.rb +6 -6
- data/lib/freight_financials_webhook_ingestion_api/models/address.rb +123 -0
- data/lib/freight_financials_webhook_ingestion_api/models/assignment_request.rb +94 -0
- data/lib/freight_financials_webhook_ingestion_api/models/assignment_response.rb +83 -0
- data/lib/{tql_otr_factoring_data_exchange/models/assignment_response.rb → freight_financials_webhook_ingestion_api/models/assignment_response_data.rb} +124 -126
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/models/base_model.rb +110 -110
- data/lib/{tql_otr_factoring_data_exchange/models/carrier1.rb → freight_financials_webhook_ingestion_api/models/carrier.rb} +96 -98
- data/lib/freight_financials_webhook_ingestion_api/models/charge.rb +104 -0
- data/lib/freight_financials_webhook_ingestion_api/models/charge_code.rb +81 -0
- data/lib/freight_financials_webhook_ingestion_api/models/factoring_company.rb +81 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/models/invoice.rb +204 -223
- data/lib/{tql_otr_factoring_data_exchange/models/document.rb → freight_financials_webhook_ingestion_api/models/invoice_document.rb} +72 -86
- data/lib/{tql_otr_factoring_data_exchange/models/invoice_exception.rb → freight_financials_webhook_ingestion_api/models/invoice_issue.rb} +122 -136
- data/lib/freight_financials_webhook_ingestion_api/models/invoice_status_response.rb +83 -0
- data/lib/{tql_otr_factoring_data_exchange/models/invoice_status_response.rb → freight_financials_webhook_ingestion_api/models/invoice_status_response_data.rb} +185 -193
- data/lib/freight_financials_webhook_ingestion_api/models/line_item.rb +131 -0
- data/lib/freight_financials_webhook_ingestion_api/models/load_response.rb +83 -0
- data/lib/{tql_otr_factoring_data_exchange/models/load_detail.rb → freight_financials_webhook_ingestion_api/models/load_response_data.rb} +141 -140
- data/lib/{tql_otr_factoring_data_exchange/models/load.rb → freight_financials_webhook_ingestion_api/models/load_slim.rb} +97 -110
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb +116 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_customer.rb +64 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb +177 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_request.rb +208 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_requested_charge.rb +64 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_response.rb +112 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb +107 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_vendor.rb +88 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_webhook_event_type.rb +56 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_webhook_request.rb +99 -0
- data/lib/freight_financials_webhook_ingestion_api/models/paged_response_of_invoice.rb +111 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/models/payment.rb +94 -108
- data/lib/freight_financials_webhook_ingestion_api/models/rating_charge_qualifier.rb +68 -0
- data/lib/freight_financials_webhook_ingestion_api/models/rating_response_format.rb +40 -0
- data/lib/freight_financials_webhook_ingestion_api/models/reference_number.rb +71 -0
- data/lib/{tql_otr_factoring_data_exchange/models/invoice_search_request.rb → freight_financials_webhook_ingestion_api/models/search_request.rb} +223 -242
- data/lib/freight_financials_webhook_ingestion_api/models/search_response.rb +83 -0
- data/lib/freight_financials_webhook_ingestion_api/models/stop.rb +81 -0
- data/lib/freight_financials_webhook_ingestion_api/models/submit_invoice_request.rb +228 -0
- data/lib/freight_financials_webhook_ingestion_api/models/submit_invoice_response.rb +83 -0
- data/lib/{tql_otr_factoring_data_exchange/models/submit_invoice_response.rb → freight_financials_webhook_ingestion_api/models/submit_invoice_response_data.rb} +105 -107
- data/lib/freight_financials_webhook_ingestion_api/models/upload_request.rb +128 -0
- data/lib/freight_financials_webhook_ingestion_api/models/upload_response.rb +83 -0
- data/lib/{tql_otr_factoring_data_exchange/models/document_upload_response.rb → freight_financials_webhook_ingestion_api/models/upload_response_data.rb} +117 -137
- data/lib/freight_financials_webhook_ingestion_api/utilities/date_time_helper.rb +11 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/utilities/file_wrapper.rb +17 -17
- data/lib/freight_financials_webhook_ingestion_api.rb +127 -0
- metadata +67 -74
- data/lib/tql_otr_factoring_data_exchange/api_helper.rb +0 -10
- data/lib/tql_otr_factoring_data_exchange/apis/assignments_api.rb +0 -45
- data/lib/tql_otr_factoring_data_exchange/apis/documents_api.rb +0 -82
- data/lib/tql_otr_factoring_data_exchange/apis/invoices_api.rb +0 -114
- data/lib/tql_otr_factoring_data_exchange/apis/loads_api.rb +0 -68
- data/lib/tql_otr_factoring_data_exchange/apis/oauth_authorization_api.rb +0 -44
- data/lib/tql_otr_factoring_data_exchange/exceptions/oauth_provider_exception.rb +0 -64
- data/lib/tql_otr_factoring_data_exchange/http/auth/oauth_2.rb +0 -156
- data/lib/tql_otr_factoring_data_exchange/http/http_call_back.rb +0 -10
- data/lib/tql_otr_factoring_data_exchange/http/http_method_enum.rb +0 -10
- data/lib/tql_otr_factoring_data_exchange/http/http_request.rb +0 -10
- data/lib/tql_otr_factoring_data_exchange/http/http_response.rb +0 -10
- data/lib/tql_otr_factoring_data_exchange/models/assignment_request.rb +0 -140
- data/lib/tql_otr_factoring_data_exchange/models/assignment_status.rb +0 -36
- data/lib/tql_otr_factoring_data_exchange/models/base64_document.rb +0 -118
- data/lib/tql_otr_factoring_data_exchange/models/base64_document_upload_request.rb +0 -107
- data/lib/tql_otr_factoring_data_exchange/models/carrier.rb +0 -98
- data/lib/tql_otr_factoring_data_exchange/models/carrier2.rb +0 -98
- data/lib/tql_otr_factoring_data_exchange/models/carrier_input.rb +0 -123
- data/lib/tql_otr_factoring_data_exchange/models/carrier_input1.rb +0 -123
- data/lib/tql_otr_factoring_data_exchange/models/charge_code.rb +0 -126
- data/lib/tql_otr_factoring_data_exchange/models/charge_code_origin.rb +0 -49
- data/lib/tql_otr_factoring_data_exchange/models/charge_input.rb +0 -146
- data/lib/tql_otr_factoring_data_exchange/models/document_type.rb +0 -288
- data/lib/tql_otr_factoring_data_exchange/models/document_upload_metadata.rb +0 -111
- data/lib/tql_otr_factoring_data_exchange/models/exception_severity.rb +0 -40
- data/lib/tql_otr_factoring_data_exchange/models/factoring_company_input.rb +0 -117
- data/lib/tql_otr_factoring_data_exchange/models/invoice_item_input.rb +0 -165
- data/lib/tql_otr_factoring_data_exchange/models/invoice_search_response.rb +0 -124
- data/lib/tql_otr_factoring_data_exchange/models/invoice_status.rb +0 -74
- data/lib/tql_otr_factoring_data_exchange/models/invoice_type.rb +0 -50
- data/lib/tql_otr_factoring_data_exchange/models/load_search_request.rb +0 -205
- data/lib/tql_otr_factoring_data_exchange/models/load_search_response.rb +0 -124
- data/lib/tql_otr_factoring_data_exchange/models/load_status.rb +0 -56
- data/lib/tql_otr_factoring_data_exchange/models/location.rb +0 -149
- data/lib/tql_otr_factoring_data_exchange/models/oauth_provider_error.rb +0 -62
- data/lib/tql_otr_factoring_data_exchange/models/oauth_scope.rb +0 -36
- data/lib/tql_otr_factoring_data_exchange/models/oauth_token.rb +0 -96
- data/lib/tql_otr_factoring_data_exchange/models/problem_details.rb +0 -96
- data/lib/tql_otr_factoring_data_exchange/models/reference_number_input.rb +0 -109
- data/lib/tql_otr_factoring_data_exchange/models/reference_type.rb +0 -90
- data/lib/tql_otr_factoring_data_exchange/models/status.rb +0 -44
- data/lib/tql_otr_factoring_data_exchange/models/stop_input.rb +0 -121
- data/lib/tql_otr_factoring_data_exchange/models/stop_type.rb +0 -62
- data/lib/tql_otr_factoring_data_exchange/models/submit_invoice_request.rb +0 -326
- data/lib/tql_otr_factoring_data_exchange/models/weight_unit.rb +0 -36
- data/lib/tql_otr_factoring_data_exchange/utilities/date_time_helper.rb +0 -11
- data/lib/tql_otr_factoring_data_exchange/utilities/union_type_lookup.rb +0 -29
- data/lib/tql_otr_factoring_data_exchange.rb +0 -107
|
@@ -1,223 +1,204 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically
|
|
4
|
-
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
-
|
|
6
|
-
require 'date'
|
|
7
|
-
module
|
|
8
|
-
#
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
#
|
|
34
|
-
#
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
#
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
#
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
#
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
#
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
#
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
#
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
@_hash =
|
|
70
|
-
@_hash['
|
|
71
|
-
@_hash['
|
|
72
|
-
@_hash['
|
|
73
|
-
@_hash['
|
|
74
|
-
@_hash['
|
|
75
|
-
@_hash['
|
|
76
|
-
@_hash
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
@
|
|
119
|
-
@
|
|
120
|
-
@
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
" #{@factoring_company_name}, factoring_company_id: #{@factoring_company_id}, status:"\
|
|
206
|
-
" #{@status}, submitted_at: #{@submitted_at}, last_updated_at: #{@last_updated_at},"\
|
|
207
|
-
" has_claim: #{@has_claim}, carrier: #{@carrier}, load: #{@load}, payment: #{@payment},"\
|
|
208
|
-
" documents: #{@documents}, additional_properties: #{@additional_properties}>"
|
|
209
|
-
end
|
|
210
|
-
|
|
211
|
-
# Provides a debugging-friendly string with detailed object information.
|
|
212
|
-
def inspect
|
|
213
|
-
class_name = self.class.name.split('::').last
|
|
214
|
-
"<#{class_name} uri: #{@uri.inspect}, invoice_number: #{@invoice_number.inspect},"\
|
|
215
|
-
" factoring_company_name: #{@factoring_company_name.inspect}, factoring_company_id:"\
|
|
216
|
-
" #{@factoring_company_id.inspect}, status: #{@status.inspect}, submitted_at:"\
|
|
217
|
-
" #{@submitted_at.inspect}, last_updated_at: #{@last_updated_at.inspect}, has_claim:"\
|
|
218
|
-
" #{@has_claim.inspect}, carrier: #{@carrier.inspect}, load: #{@load.inspect}, payment:"\
|
|
219
|
-
" #{@payment.inspect}, documents: #{@documents.inspect}, additional_properties:"\
|
|
220
|
-
" #{@additional_properties}>"
|
|
221
|
-
end
|
|
222
|
-
end
|
|
223
|
-
end
|
|
1
|
+
# freight_financials_webhook_ingestion_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically
|
|
4
|
+
# generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module FreightFinancialsWebhookIngestionApi
|
|
8
|
+
# Invoice Model.
|
|
9
|
+
class Invoice < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for this method
|
|
14
|
+
# @return [Carrier]
|
|
15
|
+
attr_accessor :carrier
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for this method
|
|
18
|
+
# @return [Array[InvoiceDocument]]
|
|
19
|
+
attr_accessor :documents
|
|
20
|
+
|
|
21
|
+
# TODO: Write general description for this method
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :factoring_company_id
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for this method
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :factoring_company_name
|
|
28
|
+
|
|
29
|
+
# TODO: Write general description for this method
|
|
30
|
+
# @return [TrueClass | FalseClass]
|
|
31
|
+
attr_accessor :has_claim
|
|
32
|
+
|
|
33
|
+
# TODO: Write general description for this method
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :invoice_number
|
|
36
|
+
|
|
37
|
+
# TODO: Write general description for this method
|
|
38
|
+
# @return [DateTime]
|
|
39
|
+
attr_accessor :last_updated_at
|
|
40
|
+
|
|
41
|
+
# TODO: Write general description for this method
|
|
42
|
+
# @return [LoadSlim]
|
|
43
|
+
attr_accessor :load
|
|
44
|
+
|
|
45
|
+
# TODO: Write general description for this method
|
|
46
|
+
# @return [Payment]
|
|
47
|
+
attr_accessor :payment
|
|
48
|
+
|
|
49
|
+
# TODO: Write general description for this method
|
|
50
|
+
# @return [Integer]
|
|
51
|
+
attr_accessor :status
|
|
52
|
+
|
|
53
|
+
# TODO: Write general description for this method
|
|
54
|
+
# @return [DateTime]
|
|
55
|
+
attr_accessor :submitted_at
|
|
56
|
+
|
|
57
|
+
# TODO: Write general description for this method
|
|
58
|
+
# @return [String]
|
|
59
|
+
attr_accessor :uri
|
|
60
|
+
|
|
61
|
+
# A mapping from model property names to API property names.
|
|
62
|
+
def self.names
|
|
63
|
+
@_hash = {} if @_hash.nil?
|
|
64
|
+
@_hash['carrier'] = 'carrier'
|
|
65
|
+
@_hash['documents'] = 'documents'
|
|
66
|
+
@_hash['factoring_company_id'] = 'factoringCompanyId'
|
|
67
|
+
@_hash['factoring_company_name'] = 'factoringCompanyName'
|
|
68
|
+
@_hash['has_claim'] = 'hasClaim'
|
|
69
|
+
@_hash['invoice_number'] = 'invoiceNumber'
|
|
70
|
+
@_hash['last_updated_at'] = 'lastUpdatedAt'
|
|
71
|
+
@_hash['load'] = 'load'
|
|
72
|
+
@_hash['payment'] = 'payment'
|
|
73
|
+
@_hash['status'] = 'status'
|
|
74
|
+
@_hash['submitted_at'] = 'submittedAt'
|
|
75
|
+
@_hash['uri'] = 'uri'
|
|
76
|
+
@_hash
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# An array for optional fields
|
|
80
|
+
def self.optionals
|
|
81
|
+
%w[
|
|
82
|
+
carrier
|
|
83
|
+
documents
|
|
84
|
+
factoring_company_id
|
|
85
|
+
factoring_company_name
|
|
86
|
+
has_claim
|
|
87
|
+
invoice_number
|
|
88
|
+
last_updated_at
|
|
89
|
+
load
|
|
90
|
+
payment
|
|
91
|
+
status
|
|
92
|
+
submitted_at
|
|
93
|
+
uri
|
|
94
|
+
]
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# An array for nullable fields
|
|
98
|
+
def self.nullables
|
|
99
|
+
%w[
|
|
100
|
+
factoring_company_id
|
|
101
|
+
uri
|
|
102
|
+
]
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
def initialize(carrier: SKIP, documents: SKIP, factoring_company_id: SKIP,
|
|
106
|
+
factoring_company_name: SKIP, has_claim: SKIP,
|
|
107
|
+
invoice_number: SKIP, last_updated_at: SKIP, load: SKIP,
|
|
108
|
+
payment: SKIP, status: SKIP, submitted_at: SKIP, uri: SKIP)
|
|
109
|
+
@carrier = carrier unless carrier == SKIP
|
|
110
|
+
@documents = documents unless documents == SKIP
|
|
111
|
+
@factoring_company_id = factoring_company_id unless factoring_company_id == SKIP
|
|
112
|
+
@factoring_company_name = factoring_company_name unless factoring_company_name == SKIP
|
|
113
|
+
@has_claim = has_claim unless has_claim == SKIP
|
|
114
|
+
@invoice_number = invoice_number unless invoice_number == SKIP
|
|
115
|
+
@last_updated_at = last_updated_at unless last_updated_at == SKIP
|
|
116
|
+
@load = load unless load == SKIP
|
|
117
|
+
@payment = payment unless payment == SKIP
|
|
118
|
+
@status = status unless status == SKIP
|
|
119
|
+
@submitted_at = submitted_at unless submitted_at == SKIP
|
|
120
|
+
@uri = uri unless uri == SKIP
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Creates an instance of the object from a hash.
|
|
124
|
+
def self.from_hash(hash)
|
|
125
|
+
return nil unless hash
|
|
126
|
+
|
|
127
|
+
# Extract variables from the hash.
|
|
128
|
+
carrier = Carrier.from_hash(hash['carrier']) if hash['carrier']
|
|
129
|
+
# Parameter is an array, so we need to iterate through it
|
|
130
|
+
documents = nil
|
|
131
|
+
unless hash['documents'].nil?
|
|
132
|
+
documents = []
|
|
133
|
+
hash['documents'].each do |structure|
|
|
134
|
+
documents << (InvoiceDocument.from_hash(structure) if structure)
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
documents = SKIP unless hash.key?('documents')
|
|
139
|
+
factoring_company_id =
|
|
140
|
+
hash.key?('factoringCompanyId') ? hash['factoringCompanyId'] : SKIP
|
|
141
|
+
factoring_company_name =
|
|
142
|
+
hash.key?('factoringCompanyName') ? hash['factoringCompanyName'] : SKIP
|
|
143
|
+
has_claim = hash.key?('hasClaim') ? hash['hasClaim'] : SKIP
|
|
144
|
+
invoice_number = hash.key?('invoiceNumber') ? hash['invoiceNumber'] : SKIP
|
|
145
|
+
last_updated_at = if hash.key?('lastUpdatedAt')
|
|
146
|
+
(DateTimeHelper.from_rfc3339(hash['lastUpdatedAt']) if hash['lastUpdatedAt'])
|
|
147
|
+
else
|
|
148
|
+
SKIP
|
|
149
|
+
end
|
|
150
|
+
load = LoadSlim.from_hash(hash['load']) if hash['load']
|
|
151
|
+
payment = Payment.from_hash(hash['payment']) if hash['payment']
|
|
152
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
153
|
+
submitted_at = if hash.key?('submittedAt')
|
|
154
|
+
(DateTimeHelper.from_rfc3339(hash['submittedAt']) if hash['submittedAt'])
|
|
155
|
+
else
|
|
156
|
+
SKIP
|
|
157
|
+
end
|
|
158
|
+
uri = hash.key?('uri') ? hash['uri'] : SKIP
|
|
159
|
+
|
|
160
|
+
# Create object from extracted values.
|
|
161
|
+
Invoice.new(carrier: carrier,
|
|
162
|
+
documents: documents,
|
|
163
|
+
factoring_company_id: factoring_company_id,
|
|
164
|
+
factoring_company_name: factoring_company_name,
|
|
165
|
+
has_claim: has_claim,
|
|
166
|
+
invoice_number: invoice_number,
|
|
167
|
+
last_updated_at: last_updated_at,
|
|
168
|
+
load: load,
|
|
169
|
+
payment: payment,
|
|
170
|
+
status: status,
|
|
171
|
+
submitted_at: submitted_at,
|
|
172
|
+
uri: uri)
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
def to_custom_last_updated_at
|
|
176
|
+
DateTimeHelper.to_rfc3339(last_updated_at)
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
def to_custom_submitted_at
|
|
180
|
+
DateTimeHelper.to_rfc3339(submitted_at)
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Provides a human-readable string representation of the object.
|
|
184
|
+
def to_s
|
|
185
|
+
class_name = self.class.name.split('::').last
|
|
186
|
+
"<#{class_name} carrier: #{@carrier}, documents: #{@documents}, factoring_company_id:"\
|
|
187
|
+
" #{@factoring_company_id}, factoring_company_name: #{@factoring_company_name}, has_claim:"\
|
|
188
|
+
" #{@has_claim}, invoice_number: #{@invoice_number}, last_updated_at: #{@last_updated_at},"\
|
|
189
|
+
" load: #{@load}, payment: #{@payment}, status: #{@status}, submitted_at: #{@submitted_at},"\
|
|
190
|
+
" uri: #{@uri}>"
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
194
|
+
def inspect
|
|
195
|
+
class_name = self.class.name.split('::').last
|
|
196
|
+
"<#{class_name} carrier: #{@carrier.inspect}, documents: #{@documents.inspect},"\
|
|
197
|
+
" factoring_company_id: #{@factoring_company_id.inspect}, factoring_company_name:"\
|
|
198
|
+
" #{@factoring_company_name.inspect}, has_claim: #{@has_claim.inspect}, invoice_number:"\
|
|
199
|
+
" #{@invoice_number.inspect}, last_updated_at: #{@last_updated_at.inspect}, load:"\
|
|
200
|
+
" #{@load.inspect}, payment: #{@payment.inspect}, status: #{@status.inspect}, submitted_at:"\
|
|
201
|
+
" #{@submitted_at.inspect}, uri: #{@uri.inspect}>"
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
end
|
|
@@ -1,86 +1,72 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically
|
|
4
|
-
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
-
|
|
6
|
-
module
|
|
7
|
-
#
|
|
8
|
-
class
|
|
9
|
-
SKIP = Object.new
|
|
10
|
-
private_constant :SKIP
|
|
11
|
-
|
|
12
|
-
#
|
|
13
|
-
# @return [UUID | String]
|
|
14
|
-
attr_accessor :document_id
|
|
15
|
-
|
|
16
|
-
#
|
|
17
|
-
# @return [
|
|
18
|
-
attr_accessor :document_type
|
|
19
|
-
|
|
20
|
-
# A mapping from model property names to API property names.
|
|
21
|
-
def self.names
|
|
22
|
-
@_hash = {} if @_hash.nil?
|
|
23
|
-
@_hash['document_id'] = 'documentId'
|
|
24
|
-
@_hash['document_type'] = 'documentType'
|
|
25
|
-
@_hash
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
# An array for optional fields
|
|
29
|
-
def self.optionals
|
|
30
|
-
%w[
|
|
31
|
-
document_id
|
|
32
|
-
document_type
|
|
33
|
-
]
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# An array for nullable fields
|
|
37
|
-
def self.nullables
|
|
38
|
-
[]
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def initialize(document_id: SKIP, document_type: SKIP
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
def to_s
|
|
74
|
-
class_name = self.class.name.split('::').last
|
|
75
|
-
"<#{class_name} document_id: #{@document_id}, document_type: #{@document_type},"\
|
|
76
|
-
" additional_properties: #{@additional_properties}>"
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
# Provides a debugging-friendly string with detailed object information.
|
|
80
|
-
def inspect
|
|
81
|
-
class_name = self.class.name.split('::').last
|
|
82
|
-
"<#{class_name} document_id: #{@document_id.inspect}, document_type:"\
|
|
83
|
-
" #{@document_type.inspect}, additional_properties: #{@additional_properties}>"
|
|
84
|
-
end
|
|
85
|
-
end
|
|
86
|
-
end
|
|
1
|
+
# freight_financials_webhook_ingestion_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically
|
|
4
|
+
# generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module FreightFinancialsWebhookIngestionApi
|
|
7
|
+
# InvoiceDocument Model.
|
|
8
|
+
class InvoiceDocument < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [UUID | String]
|
|
14
|
+
attr_accessor :document_id
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [Integer]
|
|
18
|
+
attr_accessor :document_type
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['document_id'] = 'documentId'
|
|
24
|
+
@_hash['document_type'] = 'documentType'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
document_id
|
|
32
|
+
document_type
|
|
33
|
+
]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
[]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def initialize(document_id: SKIP, document_type: SKIP)
|
|
42
|
+
@document_id = document_id unless document_id == SKIP
|
|
43
|
+
@document_type = document_type unless document_type == SKIP
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Creates an instance of the object from a hash.
|
|
47
|
+
def self.from_hash(hash)
|
|
48
|
+
return nil unless hash
|
|
49
|
+
|
|
50
|
+
# Extract variables from the hash.
|
|
51
|
+
document_id = hash.key?('documentId') ? hash['documentId'] : SKIP
|
|
52
|
+
document_type = hash.key?('documentType') ? hash['documentType'] : SKIP
|
|
53
|
+
|
|
54
|
+
# Create object from extracted values.
|
|
55
|
+
InvoiceDocument.new(document_id: document_id,
|
|
56
|
+
document_type: document_type)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Provides a human-readable string representation of the object.
|
|
60
|
+
def to_s
|
|
61
|
+
class_name = self.class.name.split('::').last
|
|
62
|
+
"<#{class_name} document_id: #{@document_id}, document_type: #{@document_type}>"
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
66
|
+
def inspect
|
|
67
|
+
class_name = self.class.name.split('::').last
|
|
68
|
+
"<#{class_name} document_id: #{@document_id.inspect}, document_type:"\
|
|
69
|
+
" #{@document_type.inspect}>"
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|