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,193 +1,185 @@
|
|
|
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
|
-
SKIP
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
#
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
#
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
#
|
|
26
|
-
# @return [
|
|
27
|
-
attr_accessor :
|
|
28
|
-
|
|
29
|
-
#
|
|
30
|
-
# @return [
|
|
31
|
-
attr_accessor :
|
|
32
|
-
|
|
33
|
-
#
|
|
34
|
-
# @return [
|
|
35
|
-
attr_accessor :
|
|
36
|
-
|
|
37
|
-
#
|
|
38
|
-
# @return [
|
|
39
|
-
attr_accessor :
|
|
40
|
-
|
|
41
|
-
#
|
|
42
|
-
#
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
#
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
@_hash =
|
|
58
|
-
@_hash['
|
|
59
|
-
@_hash['
|
|
60
|
-
@_hash['
|
|
61
|
-
@_hash
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
def
|
|
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
|
-
" #{@invoice_number.inspect}, status: #{@status.inspect}, received_at:"\
|
|
187
|
-
" #{@received_at.inspect}, completed_at: #{@completed_at.inspect}, total_charge_amount:"\
|
|
188
|
-
" #{@total_charge_amount.inspect}, currency: #{@currency.inspect}, documents:"\
|
|
189
|
-
" #{@documents.inspect}, exceptions: #{@exceptions.inspect}, additional_properties:"\
|
|
190
|
-
" #{@additional_properties}>"
|
|
191
|
-
end
|
|
192
|
-
end
|
|
193
|
-
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
|
+
# InvoiceStatusResponseData Model.
|
|
9
|
+
class InvoiceStatusResponseData < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for this method
|
|
14
|
+
# @return [DateTime]
|
|
15
|
+
attr_accessor :completed_at
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for this method
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :currency
|
|
20
|
+
|
|
21
|
+
# TODO: Write general description for this method
|
|
22
|
+
# @return [Array[Integer]]
|
|
23
|
+
attr_accessor :documents
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for this method
|
|
26
|
+
# @return [Array[InvoiceIssue]]
|
|
27
|
+
attr_accessor :issues
|
|
28
|
+
|
|
29
|
+
# TODO: Write general description for this method
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :invoice_number
|
|
32
|
+
|
|
33
|
+
# TODO: Write general description for this method
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :load_number
|
|
36
|
+
|
|
37
|
+
# TODO: Write general description for this method
|
|
38
|
+
# @return [DateTime]
|
|
39
|
+
attr_accessor :received_at
|
|
40
|
+
|
|
41
|
+
# TODO: Write general description for this method
|
|
42
|
+
# @return [Integer]
|
|
43
|
+
attr_accessor :status
|
|
44
|
+
|
|
45
|
+
# TODO: Write general description for this method
|
|
46
|
+
# @return [Float]
|
|
47
|
+
attr_accessor :total_charge_amount
|
|
48
|
+
|
|
49
|
+
# A mapping from model property names to API property names.
|
|
50
|
+
def self.names
|
|
51
|
+
@_hash = {} if @_hash.nil?
|
|
52
|
+
@_hash['completed_at'] = 'completedAt'
|
|
53
|
+
@_hash['currency'] = 'currency'
|
|
54
|
+
@_hash['documents'] = 'documents'
|
|
55
|
+
@_hash['issues'] = 'issues'
|
|
56
|
+
@_hash['invoice_number'] = 'invoiceNumber'
|
|
57
|
+
@_hash['load_number'] = 'loadNumber'
|
|
58
|
+
@_hash['received_at'] = 'receivedAt'
|
|
59
|
+
@_hash['status'] = 'status'
|
|
60
|
+
@_hash['total_charge_amount'] = 'totalChargeAmount'
|
|
61
|
+
@_hash
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# An array for optional fields
|
|
65
|
+
def self.optionals
|
|
66
|
+
%w[
|
|
67
|
+
completed_at
|
|
68
|
+
currency
|
|
69
|
+
documents
|
|
70
|
+
issues
|
|
71
|
+
invoice_number
|
|
72
|
+
load_number
|
|
73
|
+
received_at
|
|
74
|
+
status
|
|
75
|
+
total_charge_amount
|
|
76
|
+
]
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# An array for nullable fields
|
|
80
|
+
def self.nullables
|
|
81
|
+
%w[
|
|
82
|
+
completed_at
|
|
83
|
+
]
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def initialize(completed_at: SKIP, currency: SKIP, documents: SKIP,
|
|
87
|
+
issues: SKIP, invoice_number: SKIP, load_number: SKIP,
|
|
88
|
+
received_at: SKIP, status: SKIP, total_charge_amount: SKIP,
|
|
89
|
+
additional_properties: nil)
|
|
90
|
+
# Add additional model properties to the instance
|
|
91
|
+
additional_properties = {} if additional_properties.nil?
|
|
92
|
+
|
|
93
|
+
@completed_at = completed_at unless completed_at == SKIP
|
|
94
|
+
@currency = currency unless currency == SKIP
|
|
95
|
+
@documents = documents unless documents == SKIP
|
|
96
|
+
@issues = issues unless issues == SKIP
|
|
97
|
+
@invoice_number = invoice_number unless invoice_number == SKIP
|
|
98
|
+
@load_number = load_number unless load_number == SKIP
|
|
99
|
+
@received_at = received_at unless received_at == SKIP
|
|
100
|
+
@status = status unless status == SKIP
|
|
101
|
+
@total_charge_amount = total_charge_amount unless total_charge_amount == SKIP
|
|
102
|
+
@additional_properties = additional_properties
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Creates an instance of the object from a hash.
|
|
106
|
+
def self.from_hash(hash)
|
|
107
|
+
return nil unless hash
|
|
108
|
+
|
|
109
|
+
# Extract variables from the hash.
|
|
110
|
+
completed_at = if hash.key?('completedAt')
|
|
111
|
+
(DateTimeHelper.from_rfc3339(hash['completedAt']) if hash['completedAt'])
|
|
112
|
+
else
|
|
113
|
+
SKIP
|
|
114
|
+
end
|
|
115
|
+
currency = hash.key?('currency') ? hash['currency'] : SKIP
|
|
116
|
+
documents = hash.key?('documents') ? hash['documents'] : SKIP
|
|
117
|
+
# Parameter is an array, so we need to iterate through it
|
|
118
|
+
issues = nil
|
|
119
|
+
unless hash['issues'].nil?
|
|
120
|
+
issues = []
|
|
121
|
+
hash['issues'].each do |structure|
|
|
122
|
+
issues << (InvoiceIssue.from_hash(structure) if structure)
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
issues = SKIP unless hash.key?('issues')
|
|
127
|
+
invoice_number = hash.key?('invoiceNumber') ? hash['invoiceNumber'] : SKIP
|
|
128
|
+
load_number = hash.key?('loadNumber') ? hash['loadNumber'] : SKIP
|
|
129
|
+
received_at = if hash.key?('receivedAt')
|
|
130
|
+
(DateTimeHelper.from_rfc3339(hash['receivedAt']) if hash['receivedAt'])
|
|
131
|
+
else
|
|
132
|
+
SKIP
|
|
133
|
+
end
|
|
134
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
135
|
+
total_charge_amount =
|
|
136
|
+
hash.key?('totalChargeAmount') ? hash['totalChargeAmount'] : SKIP
|
|
137
|
+
|
|
138
|
+
# Create a new hash for additional properties, removing known properties.
|
|
139
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
140
|
+
|
|
141
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
142
|
+
new_hash, proc { |value| value }
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
# Create object from extracted values.
|
|
146
|
+
InvoiceStatusResponseData.new(completed_at: completed_at,
|
|
147
|
+
currency: currency,
|
|
148
|
+
documents: documents,
|
|
149
|
+
issues: issues,
|
|
150
|
+
invoice_number: invoice_number,
|
|
151
|
+
load_number: load_number,
|
|
152
|
+
received_at: received_at,
|
|
153
|
+
status: status,
|
|
154
|
+
total_charge_amount: total_charge_amount,
|
|
155
|
+
additional_properties: additional_properties)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
def to_custom_completed_at
|
|
159
|
+
DateTimeHelper.to_rfc3339(completed_at)
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
def to_custom_received_at
|
|
163
|
+
DateTimeHelper.to_rfc3339(received_at)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Provides a human-readable string representation of the object.
|
|
167
|
+
def to_s
|
|
168
|
+
class_name = self.class.name.split('::').last
|
|
169
|
+
"<#{class_name} completed_at: #{@completed_at}, currency: #{@currency}, documents:"\
|
|
170
|
+
" #{@documents}, issues: #{@issues}, invoice_number: #{@invoice_number}, load_number:"\
|
|
171
|
+
" #{@load_number}, received_at: #{@received_at}, status: #{@status}, total_charge_amount:"\
|
|
172
|
+
" #{@total_charge_amount}, additional_properties: #{@additional_properties}>"
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
176
|
+
def inspect
|
|
177
|
+
class_name = self.class.name.split('::').last
|
|
178
|
+
"<#{class_name} completed_at: #{@completed_at.inspect}, currency: #{@currency.inspect},"\
|
|
179
|
+
" documents: #{@documents.inspect}, issues: #{@issues.inspect}, invoice_number:"\
|
|
180
|
+
" #{@invoice_number.inspect}, load_number: #{@load_number.inspect}, received_at:"\
|
|
181
|
+
" #{@received_at.inspect}, status: #{@status.inspect}, total_charge_amount:"\
|
|
182
|
+
" #{@total_charge_amount.inspect}, additional_properties: #{@additional_properties}>"
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
end
|
|
@@ -0,0 +1,131 @@
|
|
|
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
|
+
# LineItem Model.
|
|
8
|
+
class LineItem < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :description
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [Float]
|
|
18
|
+
attr_accessor :freight_class
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :handling_unit
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [Integer]
|
|
26
|
+
attr_accessor :handling_unit_count
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for this method
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :item_id
|
|
31
|
+
|
|
32
|
+
# TODO: Write general description for this method
|
|
33
|
+
# @return [Float]
|
|
34
|
+
attr_accessor :weight
|
|
35
|
+
|
|
36
|
+
# TODO: Write general description for this method
|
|
37
|
+
# @return [String]
|
|
38
|
+
attr_accessor :weight_unit
|
|
39
|
+
|
|
40
|
+
# A mapping from model property names to API property names.
|
|
41
|
+
def self.names
|
|
42
|
+
@_hash = {} if @_hash.nil?
|
|
43
|
+
@_hash['description'] = 'description'
|
|
44
|
+
@_hash['freight_class'] = 'freightClass'
|
|
45
|
+
@_hash['handling_unit'] = 'handlingUnit'
|
|
46
|
+
@_hash['handling_unit_count'] = 'handlingUnitCount'
|
|
47
|
+
@_hash['item_id'] = 'itemId'
|
|
48
|
+
@_hash['weight'] = 'weight'
|
|
49
|
+
@_hash['weight_unit'] = 'weightUnit'
|
|
50
|
+
@_hash
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# An array for optional fields
|
|
54
|
+
def self.optionals
|
|
55
|
+
%w[
|
|
56
|
+
description
|
|
57
|
+
freight_class
|
|
58
|
+
handling_unit
|
|
59
|
+
handling_unit_count
|
|
60
|
+
item_id
|
|
61
|
+
weight
|
|
62
|
+
weight_unit
|
|
63
|
+
]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# An array for nullable fields
|
|
67
|
+
def self.nullables
|
|
68
|
+
%w[
|
|
69
|
+
description
|
|
70
|
+
freight_class
|
|
71
|
+
handling_unit
|
|
72
|
+
handling_unit_count
|
|
73
|
+
weight
|
|
74
|
+
weight_unit
|
|
75
|
+
]
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def initialize(description: SKIP, freight_class: SKIP, handling_unit: SKIP,
|
|
79
|
+
handling_unit_count: SKIP, item_id: SKIP, weight: SKIP,
|
|
80
|
+
weight_unit: SKIP)
|
|
81
|
+
@description = description unless description == SKIP
|
|
82
|
+
@freight_class = freight_class unless freight_class == SKIP
|
|
83
|
+
@handling_unit = handling_unit unless handling_unit == SKIP
|
|
84
|
+
@handling_unit_count = handling_unit_count unless handling_unit_count == SKIP
|
|
85
|
+
@item_id = item_id unless item_id == SKIP
|
|
86
|
+
@weight = weight unless weight == SKIP
|
|
87
|
+
@weight_unit = weight_unit unless weight_unit == SKIP
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Creates an instance of the object from a hash.
|
|
91
|
+
def self.from_hash(hash)
|
|
92
|
+
return nil unless hash
|
|
93
|
+
|
|
94
|
+
# Extract variables from the hash.
|
|
95
|
+
description = hash.key?('description') ? hash['description'] : SKIP
|
|
96
|
+
freight_class = hash.key?('freightClass') ? hash['freightClass'] : SKIP
|
|
97
|
+
handling_unit = hash.key?('handlingUnit') ? hash['handlingUnit'] : SKIP
|
|
98
|
+
handling_unit_count =
|
|
99
|
+
hash.key?('handlingUnitCount') ? hash['handlingUnitCount'] : SKIP
|
|
100
|
+
item_id = hash.key?('itemId') ? hash['itemId'] : SKIP
|
|
101
|
+
weight = hash.key?('weight') ? hash['weight'] : SKIP
|
|
102
|
+
weight_unit = hash.key?('weightUnit') ? hash['weightUnit'] : SKIP
|
|
103
|
+
|
|
104
|
+
# Create object from extracted values.
|
|
105
|
+
LineItem.new(description: description,
|
|
106
|
+
freight_class: freight_class,
|
|
107
|
+
handling_unit: handling_unit,
|
|
108
|
+
handling_unit_count: handling_unit_count,
|
|
109
|
+
item_id: item_id,
|
|
110
|
+
weight: weight,
|
|
111
|
+
weight_unit: weight_unit)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Provides a human-readable string representation of the object.
|
|
115
|
+
def to_s
|
|
116
|
+
class_name = self.class.name.split('::').last
|
|
117
|
+
"<#{class_name} description: #{@description}, freight_class: #{@freight_class},"\
|
|
118
|
+
" handling_unit: #{@handling_unit}, handling_unit_count: #{@handling_unit_count}, item_id:"\
|
|
119
|
+
" #{@item_id}, weight: #{@weight}, weight_unit: #{@weight_unit}>"
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
123
|
+
def inspect
|
|
124
|
+
class_name = self.class.name.split('::').last
|
|
125
|
+
"<#{class_name} description: #{@description.inspect}, freight_class:"\
|
|
126
|
+
" #{@freight_class.inspect}, handling_unit: #{@handling_unit.inspect}, handling_unit_count:"\
|
|
127
|
+
" #{@handling_unit_count.inspect}, item_id: #{@item_id.inspect}, weight: #{@weight.inspect},"\
|
|
128
|
+
" weight_unit: #{@weight_unit.inspect}>"
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
# LoadResponse Model.
|
|
8
|
+
class LoadResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [LoadResponseData]
|
|
14
|
+
attr_accessor :data
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [Array[String]]
|
|
18
|
+
attr_accessor :errors
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [TrueClass | FalseClass]
|
|
22
|
+
attr_accessor :is_success
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['data'] = 'data'
|
|
28
|
+
@_hash['errors'] = 'errors'
|
|
29
|
+
@_hash['is_success'] = 'isSuccess'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
data
|
|
37
|
+
errors
|
|
38
|
+
is_success
|
|
39
|
+
]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for nullable fields
|
|
43
|
+
def self.nullables
|
|
44
|
+
%w[
|
|
45
|
+
data
|
|
46
|
+
]
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def initialize(data: SKIP, errors: SKIP, is_success: SKIP)
|
|
50
|
+
@data = data unless data == SKIP
|
|
51
|
+
@errors = errors unless errors == SKIP
|
|
52
|
+
@is_success = is_success unless is_success == 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
|
+
data = LoadResponseData.from_hash(hash['data']) if hash['data']
|
|
61
|
+
errors = hash.key?('errors') ? hash['errors'] : SKIP
|
|
62
|
+
is_success = hash.key?('isSuccess') ? hash['isSuccess'] : SKIP
|
|
63
|
+
|
|
64
|
+
# Create object from extracted values.
|
|
65
|
+
LoadResponse.new(data: data,
|
|
66
|
+
errors: errors,
|
|
67
|
+
is_success: is_success)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Provides a human-readable string representation of the object.
|
|
71
|
+
def to_s
|
|
72
|
+
class_name = self.class.name.split('::').last
|
|
73
|
+
"<#{class_name} data: #{@data}, errors: #{@errors}, is_success: #{@is_success}>"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
77
|
+
def inspect
|
|
78
|
+
class_name = self.class.name.split('::').last
|
|
79
|
+
"<#{class_name} data: #{@data.inspect}, errors: #{@errors.inspect}, is_success:"\
|
|
80
|
+
" #{@is_success.inspect}>"
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|