apimatic-tql-sdk 0.0.1
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 +210 -0
- data/bin/console +15 -0
- data/lib/tql_otr_factoring_data_exchange/api_helper.rb +10 -0
- data/lib/tql_otr_factoring_data_exchange/apis/assignments_api.rb +45 -0
- data/lib/tql_otr_factoring_data_exchange/apis/base_api.rb +67 -0
- data/lib/tql_otr_factoring_data_exchange/apis/documents_api.rb +82 -0
- data/lib/tql_otr_factoring_data_exchange/apis/invoices_api.rb +114 -0
- data/lib/tql_otr_factoring_data_exchange/apis/loads_api.rb +68 -0
- data/lib/tql_otr_factoring_data_exchange/apis/oauth_authorization_api.rb +44 -0
- data/lib/tql_otr_factoring_data_exchange/client.rb +104 -0
- data/lib/tql_otr_factoring_data_exchange/configuration.rb +164 -0
- data/lib/tql_otr_factoring_data_exchange/exceptions/api_exception.rb +21 -0
- data/lib/tql_otr_factoring_data_exchange/exceptions/oauth_provider_exception.rb +64 -0
- data/lib/tql_otr_factoring_data_exchange/exceptions/problem_details_error_exception.rb +58 -0
- data/lib/tql_otr_factoring_data_exchange/http/api_response.rb +19 -0
- data/lib/tql_otr_factoring_data_exchange/http/auth/oauth_2.rb +156 -0
- data/lib/tql_otr_factoring_data_exchange/http/http_call_back.rb +10 -0
- data/lib/tql_otr_factoring_data_exchange/http/http_method_enum.rb +10 -0
- data/lib/tql_otr_factoring_data_exchange/http/http_request.rb +10 -0
- data/lib/tql_otr_factoring_data_exchange/http/http_response.rb +10 -0
- data/lib/tql_otr_factoring_data_exchange/http/proxy_settings.rb +22 -0
- data/lib/tql_otr_factoring_data_exchange/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/tql_otr_factoring_data_exchange/logging/sdk_logger.rb +17 -0
- data/lib/tql_otr_factoring_data_exchange/models/assignment_request.rb +140 -0
- data/lib/tql_otr_factoring_data_exchange/models/assignment_response.rb +126 -0
- data/lib/tql_otr_factoring_data_exchange/models/assignment_status.rb +36 -0
- data/lib/tql_otr_factoring_data_exchange/models/base64_document.rb +118 -0
- data/lib/tql_otr_factoring_data_exchange/models/base64_document_upload_request.rb +107 -0
- data/lib/tql_otr_factoring_data_exchange/models/base_model.rb +110 -0
- data/lib/tql_otr_factoring_data_exchange/models/carrier.rb +98 -0
- data/lib/tql_otr_factoring_data_exchange/models/carrier1.rb +98 -0
- data/lib/tql_otr_factoring_data_exchange/models/carrier2.rb +98 -0
- data/lib/tql_otr_factoring_data_exchange/models/carrier_input.rb +123 -0
- data/lib/tql_otr_factoring_data_exchange/models/carrier_input1.rb +123 -0
- data/lib/tql_otr_factoring_data_exchange/models/charge_code.rb +126 -0
- data/lib/tql_otr_factoring_data_exchange/models/charge_code_origin.rb +49 -0
- data/lib/tql_otr_factoring_data_exchange/models/charge_input.rb +146 -0
- data/lib/tql_otr_factoring_data_exchange/models/document.rb +86 -0
- data/lib/tql_otr_factoring_data_exchange/models/document_type.rb +288 -0
- data/lib/tql_otr_factoring_data_exchange/models/document_upload_metadata.rb +111 -0
- data/lib/tql_otr_factoring_data_exchange/models/document_upload_response.rb +137 -0
- data/lib/tql_otr_factoring_data_exchange/models/exception_severity.rb +40 -0
- data/lib/tql_otr_factoring_data_exchange/models/factoring_company_input.rb +117 -0
- data/lib/tql_otr_factoring_data_exchange/models/invoice.rb +223 -0
- data/lib/tql_otr_factoring_data_exchange/models/invoice_exception.rb +136 -0
- data/lib/tql_otr_factoring_data_exchange/models/invoice_item_input.rb +165 -0
- data/lib/tql_otr_factoring_data_exchange/models/invoice_search_request.rb +242 -0
- data/lib/tql_otr_factoring_data_exchange/models/invoice_search_response.rb +124 -0
- data/lib/tql_otr_factoring_data_exchange/models/invoice_status.rb +74 -0
- data/lib/tql_otr_factoring_data_exchange/models/invoice_status_response.rb +193 -0
- data/lib/tql_otr_factoring_data_exchange/models/invoice_type.rb +50 -0
- data/lib/tql_otr_factoring_data_exchange/models/load.rb +110 -0
- data/lib/tql_otr_factoring_data_exchange/models/load_detail.rb +140 -0
- data/lib/tql_otr_factoring_data_exchange/models/load_search_request.rb +205 -0
- data/lib/tql_otr_factoring_data_exchange/models/load_search_response.rb +124 -0
- data/lib/tql_otr_factoring_data_exchange/models/load_status.rb +56 -0
- data/lib/tql_otr_factoring_data_exchange/models/location.rb +149 -0
- data/lib/tql_otr_factoring_data_exchange/models/oauth_provider_error.rb +62 -0
- data/lib/tql_otr_factoring_data_exchange/models/oauth_scope.rb +36 -0
- data/lib/tql_otr_factoring_data_exchange/models/oauth_token.rb +96 -0
- data/lib/tql_otr_factoring_data_exchange/models/payment.rb +108 -0
- data/lib/tql_otr_factoring_data_exchange/models/problem_details.rb +96 -0
- data/lib/tql_otr_factoring_data_exchange/models/reference_number_input.rb +109 -0
- data/lib/tql_otr_factoring_data_exchange/models/reference_type.rb +90 -0
- data/lib/tql_otr_factoring_data_exchange/models/status.rb +44 -0
- data/lib/tql_otr_factoring_data_exchange/models/stop_input.rb +121 -0
- data/lib/tql_otr_factoring_data_exchange/models/stop_type.rb +62 -0
- data/lib/tql_otr_factoring_data_exchange/models/submit_invoice_request.rb +326 -0
- data/lib/tql_otr_factoring_data_exchange/models/submit_invoice_response.rb +107 -0
- data/lib/tql_otr_factoring_data_exchange/models/weight_unit.rb +36 -0
- data/lib/tql_otr_factoring_data_exchange/utilities/date_time_helper.rb +11 -0
- data/lib/tql_otr_factoring_data_exchange/utilities/file_wrapper.rb +28 -0
- data/lib/tql_otr_factoring_data_exchange/utilities/union_type_lookup.rb +29 -0
- data/lib/tql_otr_factoring_data_exchange.rb +107 -0
- metadata +160 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
# tql_otr_factoring_data_exchange
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TqlOtrFactoringDataExchange
|
|
7
|
+
# Document type classification used for categorizing uploaded documents.
|
|
8
|
+
class DocumentType
|
|
9
|
+
DOCUMENT_TYPE = [
|
|
10
|
+
# TODO: Write general description for INVOICE
|
|
11
|
+
INVOICE = 'Invoice'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for DELIVERYRECEIPT
|
|
14
|
+
DELIVERYRECEIPT = 'DeliveryReceipt'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for PROOFOFDELIVERY
|
|
17
|
+
PROOFOFDELIVERY = 'ProofOfDelivery'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for BILLOFLADING
|
|
20
|
+
BILLOFLADING = 'BillOfLading'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for NOTICEOFASSIGNMENT
|
|
23
|
+
NOTICEOFASSIGNMENT = 'NoticeOfAssignment'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for RATECONFIRMATION
|
|
26
|
+
RATECONFIRMATION = 'RateConfirmation'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for WEIGHTANDINSPECTIONCERT
|
|
29
|
+
WEIGHTANDINSPECTIONCERT = 'WeightAndInspectionCert'.freeze,
|
|
30
|
+
|
|
31
|
+
# TODO: Write general description for WEIGHTANDINSPECTIONCERTIFICATE
|
|
32
|
+
WEIGHTANDINSPECTIONCERTIFICATE = 'WeightAndInspectionCertificate'.freeze,
|
|
33
|
+
|
|
34
|
+
# TODO: Write general description for LETTEROFAUTHORITY
|
|
35
|
+
LETTEROFAUTHORITY = 'LetterOfAuthority'.freeze,
|
|
36
|
+
|
|
37
|
+
# TODO: Write general description for LUMPERRECEIPT
|
|
38
|
+
LUMPERRECEIPT = 'LumperReceipt'.freeze,
|
|
39
|
+
|
|
40
|
+
# TODO: Write general description for PACKINGLIST
|
|
41
|
+
PACKINGLIST = 'PackingList'.freeze,
|
|
42
|
+
|
|
43
|
+
# TODO: Write general description for GENERATEDINVOICE
|
|
44
|
+
GENERATEDINVOICE = 'GeneratedInvoice'.freeze,
|
|
45
|
+
|
|
46
|
+
# TODO: Write general description for EMAIL
|
|
47
|
+
EMAIL = 'Email'.freeze,
|
|
48
|
+
|
|
49
|
+
# TODO: Write general description for INBOUNDEMAIL
|
|
50
|
+
INBOUNDEMAIL = 'InboundEmail'.freeze,
|
|
51
|
+
|
|
52
|
+
# TODO: Write general description for COMMERCIALINVOICE
|
|
53
|
+
COMMERCIALINVOICE = 'CommercialInvoice'.freeze,
|
|
54
|
+
|
|
55
|
+
# TODO: Write general description for CERTIFICATEOFORIGIN
|
|
56
|
+
CERTIFICATEOFORIGIN = 'CertificateOfOrigin'.freeze,
|
|
57
|
+
|
|
58
|
+
# TODO: Write general description for CUSTOMERRATECONFIRMATION
|
|
59
|
+
CUSTOMERRATECONFIRMATION = 'CustomerRateConfirmation'.freeze,
|
|
60
|
+
|
|
61
|
+
# TODO: Write general description for ELECTRONICINTERCHANGERECEIPT
|
|
62
|
+
ELECTRONICINTERCHANGERECEIPT = 'ElectronicInterchangeReceipt'.freeze,
|
|
63
|
+
|
|
64
|
+
# TODO: Write general description for GATEPASS
|
|
65
|
+
GATEPASS = 'GatePass'.freeze,
|
|
66
|
+
|
|
67
|
+
# TODO: Write general description for GATEOUTINTICKET
|
|
68
|
+
GATEOUTINTICKET = 'GateOutInTicket'.freeze,
|
|
69
|
+
|
|
70
|
+
# TODO: Write general description for INSURANCECERTIFICATE
|
|
71
|
+
INSURANCECERTIFICATE = 'InsuranceCertificate'.freeze,
|
|
72
|
+
|
|
73
|
+
# TODO: Write general description for OTHERRECEIPT
|
|
74
|
+
OTHERRECEIPT = 'OtherReceipt'.freeze,
|
|
75
|
+
|
|
76
|
+
# TODO: Write general description for W9
|
|
77
|
+
W9 = 'W9'.freeze,
|
|
78
|
+
|
|
79
|
+
# TODO: Write general description for DELIVERYORDER
|
|
80
|
+
DELIVERYORDER = 'DeliveryOrder'.freeze,
|
|
81
|
+
|
|
82
|
+
# TODO: Write general description for WEIGHTSCALETICKET
|
|
83
|
+
WEIGHTSCALETICKET = 'WeightScaleTicket'.freeze,
|
|
84
|
+
|
|
85
|
+
# TODO: Write general description for TRAILERINTERCHANGERECEIPT
|
|
86
|
+
TRAILERINTERCHANGERECEIPT = 'TrailerInterchangeReceipt'.freeze,
|
|
87
|
+
|
|
88
|
+
# TODO: Write general description for PURCHASEORDER
|
|
89
|
+
PURCHASEORDER = 'PurchaseOrder'.freeze,
|
|
90
|
+
|
|
91
|
+
# TODO: Write general description for ESCORTTICKET
|
|
92
|
+
ESCORTTICKET = 'EscortTicket'.freeze,
|
|
93
|
+
|
|
94
|
+
# TODO: Write general description for PERMITRECEIPT
|
|
95
|
+
PERMITRECEIPT = 'PermitReceipt'.freeze,
|
|
96
|
+
|
|
97
|
+
# TODO: Write general description for SERVICEORDER
|
|
98
|
+
SERVICEORDER = 'ServiceOrder'.freeze,
|
|
99
|
+
|
|
100
|
+
# TODO: Write general description for CERTIFICATEOFDESTRUCTION
|
|
101
|
+
CERTIFICATEOFDESTRUCTION = 'CertificateOfDestruction'.freeze,
|
|
102
|
+
|
|
103
|
+
# TODO: Write general description for DONATIONRECEIPT
|
|
104
|
+
DONATIONRECEIPT = 'DonationReceipt'.freeze,
|
|
105
|
+
|
|
106
|
+
# TODO: Write general description for SMARTANDFINALSTAMP
|
|
107
|
+
SMARTANDFINALSTAMP = 'SmartAndFinalStamp'.freeze,
|
|
108
|
+
|
|
109
|
+
# TODO: Write general description for INBOUNDTRIPREPORT
|
|
110
|
+
INBOUNDTRIPREPORT = 'InboundTripReport'.freeze,
|
|
111
|
+
|
|
112
|
+
# TODO: Write general description for WEIGHMASTERCERTIFICATE
|
|
113
|
+
WEIGHMASTERCERTIFICATE = 'WeighmasterCertificate'.freeze,
|
|
114
|
+
|
|
115
|
+
# TODO: Write general description for CARGOACTIVITYSHEET
|
|
116
|
+
CARGOACTIVITYSHEET = 'CargoActivitySheet'.freeze,
|
|
117
|
+
|
|
118
|
+
# TODO: Write general description for WEBERBOL
|
|
119
|
+
WEBERBOL = 'WeberBOL'.freeze,
|
|
120
|
+
|
|
121
|
+
# TODO: Write general description for TIMECARD
|
|
122
|
+
TIMECARD = 'TimeCard'.freeze,
|
|
123
|
+
|
|
124
|
+
# TODO: Write general description for TRANSFERSHEET
|
|
125
|
+
TRANSFERSHEET = 'TransferSheet'.freeze,
|
|
126
|
+
|
|
127
|
+
# TODO: Write general description for TRIPMANIFEST
|
|
128
|
+
TRIPMANIFEST = 'TripManifest'.freeze,
|
|
129
|
+
|
|
130
|
+
# TODO: Write general description for TRAILERCONTROLRECORD
|
|
131
|
+
TRAILERCONTROLRECORD = 'TrailerControlRecord'.freeze,
|
|
132
|
+
|
|
133
|
+
# TODO: Write general description for TARGETTRIPSHEET
|
|
134
|
+
TARGETTRIPSHEET = 'TargetTripSheet'.freeze,
|
|
135
|
+
|
|
136
|
+
# TODO: Write general description for EXITPASS
|
|
137
|
+
EXITPASS = 'ExitPass'.freeze,
|
|
138
|
+
|
|
139
|
+
# TODO: Write general description for PORTOFARTHURBOL
|
|
140
|
+
PORTOFARTHURBOL = 'PortOfArthurBOL'.freeze,
|
|
141
|
+
|
|
142
|
+
# TODO: Write general description for COLDCHAINCUSTODYFORM
|
|
143
|
+
COLDCHAINCUSTODYFORM = 'ColdChainCustodyForm'.freeze,
|
|
144
|
+
|
|
145
|
+
# TODO: Write general description for IGFFREIGHTDISPATCH
|
|
146
|
+
IGFFREIGHTDISPATCH = 'IGFFreightDispatch'.freeze,
|
|
147
|
+
|
|
148
|
+
# TODO: Write general description for EQUIPMENTSUBMISSIONFORM
|
|
149
|
+
EQUIPMENTSUBMISSIONFORM = 'EquipmentSubmissionForm'.freeze,
|
|
150
|
+
|
|
151
|
+
# TODO: Write general description for RELEASE
|
|
152
|
+
RELEASE = 'Release'.freeze,
|
|
153
|
+
|
|
154
|
+
# TODO: Write general description for ACIMANIFEST
|
|
155
|
+
ACIMANIFEST = 'ACIManifest'.freeze,
|
|
156
|
+
|
|
157
|
+
# TODO: Write general description for TRAILERPICTURE
|
|
158
|
+
TRAILERPICTURE = 'TrailerPicture'.freeze,
|
|
159
|
+
|
|
160
|
+
# TODO: Write general description for MATERIALSAFETYDATASHEET
|
|
161
|
+
MATERIALSAFETYDATASHEET = 'MaterialSafetyDataSheet'.freeze,
|
|
162
|
+
|
|
163
|
+
# TODO: Write general description for SHIPTICKET
|
|
164
|
+
SHIPTICKET = 'ShipTicket'.freeze,
|
|
165
|
+
|
|
166
|
+
# TODO: Write general description for DELIVERYTICKET
|
|
167
|
+
DELIVERYTICKET = 'DeliveryTicket'.freeze,
|
|
168
|
+
|
|
169
|
+
# TODO: Write general description for INVOICECORRECTED
|
|
170
|
+
INVOICECORRECTED = 'InvoiceCorrected'.freeze,
|
|
171
|
+
|
|
172
|
+
# TODO: Write general description for EIRTICKET
|
|
173
|
+
EIRTICKET = 'EIRTicket'.freeze,
|
|
174
|
+
|
|
175
|
+
# TODO: Write general description for PALLETRECEIPT
|
|
176
|
+
PALLETRECEIPT = 'PalletReceipt'.freeze,
|
|
177
|
+
|
|
178
|
+
# TODO: Write general description for HISTORICALAUDITDOCUMENTS
|
|
179
|
+
HISTORICALAUDITDOCUMENTS = 'HistoricalAuditDocuments'.freeze,
|
|
180
|
+
|
|
181
|
+
# TODO: Write general description for DETENTIONRECEIPT
|
|
182
|
+
DETENTIONRECEIPT = 'DetentionReceipt'.freeze,
|
|
183
|
+
|
|
184
|
+
# TODO: Write general description for MANIFEST
|
|
185
|
+
MANIFEST = 'Manifest'.freeze,
|
|
186
|
+
|
|
187
|
+
# TODO: Write general description for CUSTOMERRATEAPPROVAL
|
|
188
|
+
CUSTOMERRATEAPPROVAL = 'CustomerRateApproval'.freeze,
|
|
189
|
+
|
|
190
|
+
# TODO: Write general description for LOADCOVERSHEET
|
|
191
|
+
LOADCOVERSHEET = 'LoadCoverSheet'.freeze,
|
|
192
|
+
|
|
193
|
+
# TODO: Write general description for SAFETYCHECKLIST
|
|
194
|
+
SAFETYCHECKLIST = 'SafetyChecklist'.freeze,
|
|
195
|
+
|
|
196
|
+
# TODO: Write general description for WALMARTDELIVERYCONFIRMATIONREPORT
|
|
197
|
+
WALMARTDELIVERYCONFIRMATIONREPORT = 'WalmartDeliveryConfirmationReport'.freeze,
|
|
198
|
+
|
|
199
|
+
# TODO: Write general description for STATEMENTINVOICE
|
|
200
|
+
STATEMENTINVOICE = 'StatementInvoice'.freeze,
|
|
201
|
+
|
|
202
|
+
# TODO: Write general description for UNKNOWN
|
|
203
|
+
UNKNOWN = 'Unknown'.freeze
|
|
204
|
+
].freeze
|
|
205
|
+
|
|
206
|
+
def self.validate(value)
|
|
207
|
+
return false if value.nil?
|
|
208
|
+
|
|
209
|
+
DOCUMENT_TYPE.include?(value)
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
def self.from_value(value, default_value = INVOICE)
|
|
213
|
+
return default_value if value.nil?
|
|
214
|
+
|
|
215
|
+
str = value.to_s.strip
|
|
216
|
+
|
|
217
|
+
case str.downcase
|
|
218
|
+
when 'invoice' then INVOICE
|
|
219
|
+
when 'deliveryreceipt' then DELIVERYRECEIPT
|
|
220
|
+
when 'proofofdelivery' then PROOFOFDELIVERY
|
|
221
|
+
when 'billoflading' then BILLOFLADING
|
|
222
|
+
when 'noticeofassignment' then NOTICEOFASSIGNMENT
|
|
223
|
+
when 'rateconfirmation' then RATECONFIRMATION
|
|
224
|
+
when 'weightandinspectioncert' then WEIGHTANDINSPECTIONCERT
|
|
225
|
+
when 'weightandinspectioncertificate' then WEIGHTANDINSPECTIONCERTIFICATE
|
|
226
|
+
when 'letterofauthority' then LETTEROFAUTHORITY
|
|
227
|
+
when 'lumperreceipt' then LUMPERRECEIPT
|
|
228
|
+
when 'packinglist' then PACKINGLIST
|
|
229
|
+
when 'generatedinvoice' then GENERATEDINVOICE
|
|
230
|
+
when 'email' then EMAIL
|
|
231
|
+
when 'inboundemail' then INBOUNDEMAIL
|
|
232
|
+
when 'commercialinvoice' then COMMERCIALINVOICE
|
|
233
|
+
when 'certificateoforigin' then CERTIFICATEOFORIGIN
|
|
234
|
+
when 'customerrateconfirmation' then CUSTOMERRATECONFIRMATION
|
|
235
|
+
when 'electronicinterchangereceipt' then ELECTRONICINTERCHANGERECEIPT
|
|
236
|
+
when 'gatepass' then GATEPASS
|
|
237
|
+
when 'gateoutinticket' then GATEOUTINTICKET
|
|
238
|
+
when 'insurancecertificate' then INSURANCECERTIFICATE
|
|
239
|
+
when 'otherreceipt' then OTHERRECEIPT
|
|
240
|
+
when 'w9' then W9
|
|
241
|
+
when 'deliveryorder' then DELIVERYORDER
|
|
242
|
+
when 'weightscaleticket' then WEIGHTSCALETICKET
|
|
243
|
+
when 'trailerinterchangereceipt' then TRAILERINTERCHANGERECEIPT
|
|
244
|
+
when 'purchaseorder' then PURCHASEORDER
|
|
245
|
+
when 'escortticket' then ESCORTTICKET
|
|
246
|
+
when 'permitreceipt' then PERMITRECEIPT
|
|
247
|
+
when 'serviceorder' then SERVICEORDER
|
|
248
|
+
when 'certificateofdestruction' then CERTIFICATEOFDESTRUCTION
|
|
249
|
+
when 'donationreceipt' then DONATIONRECEIPT
|
|
250
|
+
when 'smartandfinalstamp' then SMARTANDFINALSTAMP
|
|
251
|
+
when 'inboundtripreport' then INBOUNDTRIPREPORT
|
|
252
|
+
when 'weighmastercertificate' then WEIGHMASTERCERTIFICATE
|
|
253
|
+
when 'cargoactivitysheet' then CARGOACTIVITYSHEET
|
|
254
|
+
when 'weberbol' then WEBERBOL
|
|
255
|
+
when 'timecard' then TIMECARD
|
|
256
|
+
when 'transfersheet' then TRANSFERSHEET
|
|
257
|
+
when 'tripmanifest' then TRIPMANIFEST
|
|
258
|
+
when 'trailercontrolrecord' then TRAILERCONTROLRECORD
|
|
259
|
+
when 'targettripsheet' then TARGETTRIPSHEET
|
|
260
|
+
when 'exitpass' then EXITPASS
|
|
261
|
+
when 'portofarthurbol' then PORTOFARTHURBOL
|
|
262
|
+
when 'coldchaincustodyform' then COLDCHAINCUSTODYFORM
|
|
263
|
+
when 'igffreightdispatch' then IGFFREIGHTDISPATCH
|
|
264
|
+
when 'equipmentsubmissionform' then EQUIPMENTSUBMISSIONFORM
|
|
265
|
+
when 'release' then RELEASE
|
|
266
|
+
when 'acimanifest' then ACIMANIFEST
|
|
267
|
+
when 'trailerpicture' then TRAILERPICTURE
|
|
268
|
+
when 'materialsafetydatasheet' then MATERIALSAFETYDATASHEET
|
|
269
|
+
when 'shipticket' then SHIPTICKET
|
|
270
|
+
when 'deliveryticket' then DELIVERYTICKET
|
|
271
|
+
when 'invoicecorrected' then INVOICECORRECTED
|
|
272
|
+
when 'eirticket' then EIRTICKET
|
|
273
|
+
when 'palletreceipt' then PALLETRECEIPT
|
|
274
|
+
when 'historicalauditdocuments' then HISTORICALAUDITDOCUMENTS
|
|
275
|
+
when 'detentionreceipt' then DETENTIONRECEIPT
|
|
276
|
+
when 'manifest' then MANIFEST
|
|
277
|
+
when 'customerrateapproval' then CUSTOMERRATEAPPROVAL
|
|
278
|
+
when 'loadcoversheet' then LOADCOVERSHEET
|
|
279
|
+
when 'safetychecklist' then SAFETYCHECKLIST
|
|
280
|
+
when 'walmartdeliveryconfirmationreport' then WALMARTDELIVERYCONFIRMATIONREPORT
|
|
281
|
+
when 'statementinvoice' then STATEMENTINVOICE
|
|
282
|
+
when 'unknown' then UNKNOWN
|
|
283
|
+
else
|
|
284
|
+
default_value
|
|
285
|
+
end
|
|
286
|
+
end
|
|
287
|
+
end
|
|
288
|
+
end
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# tql_otr_factoring_data_exchange
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TqlOtrFactoringDataExchange
|
|
7
|
+
# Metadata for the document upload, provided as the `metadata` part of the
|
|
8
|
+
# `multipart/form-data` request. Specifies the invoice linkage, document
|
|
9
|
+
# classification, and optional tags.
|
|
10
|
+
class DocumentUploadMetadata < BaseModel
|
|
11
|
+
SKIP = Object.new
|
|
12
|
+
private_constant :SKIP
|
|
13
|
+
|
|
14
|
+
# The factoring company's invoice number this document is associated with.
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :invoice_number
|
|
17
|
+
|
|
18
|
+
# Document type classification used for categorizing uploaded documents.
|
|
19
|
+
# @return [DocumentType]
|
|
20
|
+
attr_accessor :document_type
|
|
21
|
+
|
|
22
|
+
# Original file name, if available.
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :file_name
|
|
25
|
+
|
|
26
|
+
# Arbitrary key-value metadata tags for this document. Keys and values are
|
|
27
|
+
# both strings. Use tags to annotate documents with operational data such as
|
|
28
|
+
# shortage counts, pallet quantities, seal numbers, etc.
|
|
29
|
+
# @return [Hash[String, String]]
|
|
30
|
+
attr_accessor :tags
|
|
31
|
+
|
|
32
|
+
# A mapping from model property names to API property names.
|
|
33
|
+
def self.names
|
|
34
|
+
@_hash = {} if @_hash.nil?
|
|
35
|
+
@_hash['invoice_number'] = 'invoiceNumber'
|
|
36
|
+
@_hash['document_type'] = 'documentType'
|
|
37
|
+
@_hash['file_name'] = 'fileName'
|
|
38
|
+
@_hash['tags'] = 'tags'
|
|
39
|
+
@_hash
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for optional fields
|
|
43
|
+
def self.optionals
|
|
44
|
+
%w[
|
|
45
|
+
file_name
|
|
46
|
+
tags
|
|
47
|
+
]
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# An array for nullable fields
|
|
51
|
+
def self.nullables
|
|
52
|
+
%w[
|
|
53
|
+
file_name
|
|
54
|
+
tags
|
|
55
|
+
]
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def initialize(invoice_number:, document_type:, file_name: SKIP, tags: SKIP,
|
|
59
|
+
additional_properties: nil)
|
|
60
|
+
# Add additional model properties to the instance
|
|
61
|
+
additional_properties = {} if additional_properties.nil?
|
|
62
|
+
|
|
63
|
+
@invoice_number = invoice_number
|
|
64
|
+
@document_type = document_type
|
|
65
|
+
@file_name = file_name unless file_name == SKIP
|
|
66
|
+
@tags = tags unless tags == SKIP
|
|
67
|
+
@additional_properties = additional_properties
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Creates an instance of the object from a hash.
|
|
71
|
+
def self.from_hash(hash)
|
|
72
|
+
return nil unless hash
|
|
73
|
+
|
|
74
|
+
# Extract variables from the hash.
|
|
75
|
+
invoice_number = hash.key?('invoiceNumber') ? hash['invoiceNumber'] : nil
|
|
76
|
+
document_type = hash.key?('documentType') ? hash['documentType'] : nil
|
|
77
|
+
file_name = hash.key?('fileName') ? hash['fileName'] : SKIP
|
|
78
|
+
tags = hash.key?('tags') ? hash['tags'] : SKIP
|
|
79
|
+
|
|
80
|
+
# Create a new hash for additional properties, removing known properties.
|
|
81
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
82
|
+
|
|
83
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
84
|
+
new_hash, proc { |value| value }
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
# Create object from extracted values.
|
|
88
|
+
DocumentUploadMetadata.new(invoice_number: invoice_number,
|
|
89
|
+
document_type: document_type,
|
|
90
|
+
file_name: file_name,
|
|
91
|
+
tags: tags,
|
|
92
|
+
additional_properties: additional_properties)
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Provides a human-readable string representation of the object.
|
|
96
|
+
def to_s
|
|
97
|
+
class_name = self.class.name.split('::').last
|
|
98
|
+
"<#{class_name} invoice_number: #{@invoice_number}, document_type: #{@document_type},"\
|
|
99
|
+
" file_name: #{@file_name}, tags: #{@tags}, additional_properties:"\
|
|
100
|
+
" #{@additional_properties}>"
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
104
|
+
def inspect
|
|
105
|
+
class_name = self.class.name.split('::').last
|
|
106
|
+
"<#{class_name} invoice_number: #{@invoice_number.inspect}, document_type:"\
|
|
107
|
+
" #{@document_type.inspect}, file_name: #{@file_name.inspect}, tags: #{@tags.inspect},"\
|
|
108
|
+
" additional_properties: #{@additional_properties}>"
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# tql_otr_factoring_data_exchange
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module TqlOtrFactoringDataExchange
|
|
8
|
+
# Acknowledgement that the document was accepted for processing.
|
|
9
|
+
class DocumentUploadResponse < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# System-generated unique identifier for this document.
|
|
14
|
+
# @return [UUID | String]
|
|
15
|
+
attr_accessor :document_id
|
|
16
|
+
|
|
17
|
+
# The invoice this document was linked to.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :invoice_number
|
|
20
|
+
|
|
21
|
+
# Document type classification used for categorizing uploaded documents.
|
|
22
|
+
# @return [DocumentType]
|
|
23
|
+
attr_accessor :document_type
|
|
24
|
+
|
|
25
|
+
# Processing status of this document.
|
|
26
|
+
# @return [Status]
|
|
27
|
+
attr_accessor :status
|
|
28
|
+
|
|
29
|
+
# The tags that were submitted with this document (echoed back).
|
|
30
|
+
# @return [Hash[String, String]]
|
|
31
|
+
attr_accessor :tags
|
|
32
|
+
|
|
33
|
+
# UTC timestamp when the document was received.
|
|
34
|
+
# @return [DateTime]
|
|
35
|
+
attr_accessor :received_at
|
|
36
|
+
|
|
37
|
+
# A mapping from model property names to API property names.
|
|
38
|
+
def self.names
|
|
39
|
+
@_hash = {} if @_hash.nil?
|
|
40
|
+
@_hash['document_id'] = 'documentId'
|
|
41
|
+
@_hash['invoice_number'] = 'invoiceNumber'
|
|
42
|
+
@_hash['document_type'] = 'documentType'
|
|
43
|
+
@_hash['status'] = 'status'
|
|
44
|
+
@_hash['tags'] = 'tags'
|
|
45
|
+
@_hash['received_at'] = 'receivedAt'
|
|
46
|
+
@_hash
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for optional fields
|
|
50
|
+
def self.optionals
|
|
51
|
+
%w[
|
|
52
|
+
document_id
|
|
53
|
+
invoice_number
|
|
54
|
+
document_type
|
|
55
|
+
status
|
|
56
|
+
tags
|
|
57
|
+
received_at
|
|
58
|
+
]
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# An array for nullable fields
|
|
62
|
+
def self.nullables
|
|
63
|
+
%w[
|
|
64
|
+
tags
|
|
65
|
+
]
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def initialize(document_id: SKIP, invoice_number: SKIP, document_type: SKIP,
|
|
69
|
+
status: SKIP, tags: SKIP, received_at: SKIP,
|
|
70
|
+
additional_properties: nil)
|
|
71
|
+
# Add additional model properties to the instance
|
|
72
|
+
additional_properties = {} if additional_properties.nil?
|
|
73
|
+
|
|
74
|
+
@document_id = document_id unless document_id == SKIP
|
|
75
|
+
@invoice_number = invoice_number unless invoice_number == SKIP
|
|
76
|
+
@document_type = document_type unless document_type == SKIP
|
|
77
|
+
@status = status unless status == SKIP
|
|
78
|
+
@tags = tags unless tags == SKIP
|
|
79
|
+
@received_at = received_at unless received_at == SKIP
|
|
80
|
+
@additional_properties = additional_properties
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Creates an instance of the object from a hash.
|
|
84
|
+
def self.from_hash(hash)
|
|
85
|
+
return nil unless hash
|
|
86
|
+
|
|
87
|
+
# Extract variables from the hash.
|
|
88
|
+
document_id = hash.key?('documentId') ? hash['documentId'] : SKIP
|
|
89
|
+
invoice_number = hash.key?('invoiceNumber') ? hash['invoiceNumber'] : SKIP
|
|
90
|
+
document_type = hash.key?('documentType') ? hash['documentType'] : SKIP
|
|
91
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
92
|
+
tags = hash.key?('tags') ? hash['tags'] : SKIP
|
|
93
|
+
received_at = if hash.key?('receivedAt')
|
|
94
|
+
(DateTimeHelper.from_rfc3339(hash['receivedAt']) if hash['receivedAt'])
|
|
95
|
+
else
|
|
96
|
+
SKIP
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Create a new hash for additional properties, removing known properties.
|
|
100
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
101
|
+
|
|
102
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
103
|
+
new_hash, proc { |value| value }
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
# Create object from extracted values.
|
|
107
|
+
DocumentUploadResponse.new(document_id: document_id,
|
|
108
|
+
invoice_number: invoice_number,
|
|
109
|
+
document_type: document_type,
|
|
110
|
+
status: status,
|
|
111
|
+
tags: tags,
|
|
112
|
+
received_at: received_at,
|
|
113
|
+
additional_properties: additional_properties)
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
def to_custom_received_at
|
|
117
|
+
DateTimeHelper.to_rfc3339(received_at)
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Provides a human-readable string representation of the object.
|
|
121
|
+
def to_s
|
|
122
|
+
class_name = self.class.name.split('::').last
|
|
123
|
+
"<#{class_name} document_id: #{@document_id}, invoice_number: #{@invoice_number},"\
|
|
124
|
+
" document_type: #{@document_type}, status: #{@status}, tags: #{@tags}, received_at:"\
|
|
125
|
+
" #{@received_at}, additional_properties: #{@additional_properties}>"
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
129
|
+
def inspect
|
|
130
|
+
class_name = self.class.name.split('::').last
|
|
131
|
+
"<#{class_name} document_id: #{@document_id.inspect}, invoice_number:"\
|
|
132
|
+
" #{@invoice_number.inspect}, document_type: #{@document_type.inspect}, status:"\
|
|
133
|
+
" #{@status.inspect}, tags: #{@tags.inspect}, received_at: #{@received_at.inspect},"\
|
|
134
|
+
" additional_properties: #{@additional_properties}>"
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# tql_otr_factoring_data_exchange
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TqlOtrFactoringDataExchange
|
|
7
|
+
# Severity level of a processing exception.
|
|
8
|
+
class ExceptionSeverity
|
|
9
|
+
EXCEPTION_SEVERITY = [
|
|
10
|
+
# TODO: Write general description for WARNING
|
|
11
|
+
WARNING = 'Warning'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for ERROR
|
|
14
|
+
ERROR = 'Error'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for CRITICAL
|
|
17
|
+
CRITICAL = 'Critical'.freeze
|
|
18
|
+
].freeze
|
|
19
|
+
|
|
20
|
+
def self.validate(value)
|
|
21
|
+
return false if value.nil?
|
|
22
|
+
|
|
23
|
+
EXCEPTION_SEVERITY.include?(value)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.from_value(value, default_value = WARNING)
|
|
27
|
+
return default_value if value.nil?
|
|
28
|
+
|
|
29
|
+
str = value.to_s.strip
|
|
30
|
+
|
|
31
|
+
case str.downcase
|
|
32
|
+
when 'warning' then WARNING
|
|
33
|
+
when 'error' then ERROR
|
|
34
|
+
when 'critical' then CRITICAL
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# tql_otr_factoring_data_exchange
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TqlOtrFactoringDataExchange
|
|
7
|
+
# Identifies the factoring company that purchased (bought out) the carrier's
|
|
8
|
+
# loads.
|
|
9
|
+
class FactoringCompanyInput < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Legal or DBA name of the factoring company.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :company_name
|
|
16
|
+
|
|
17
|
+
# Contact email address for the factoring company.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :email
|
|
20
|
+
|
|
21
|
+
# Contact phone number for the factoring company.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :phone
|
|
24
|
+
|
|
25
|
+
# A mapping from model property names to API property names.
|
|
26
|
+
def self.names
|
|
27
|
+
@_hash = {} if @_hash.nil?
|
|
28
|
+
@_hash['company_name'] = 'companyName'
|
|
29
|
+
@_hash['email'] = 'email'
|
|
30
|
+
@_hash['phone'] = 'phone'
|
|
31
|
+
@_hash
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# An array for optional fields
|
|
35
|
+
def self.optionals
|
|
36
|
+
[]
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# An array for nullable fields
|
|
40
|
+
def self.nullables
|
|
41
|
+
[]
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def initialize(company_name:, email:, phone:, additional_properties: nil)
|
|
45
|
+
# Add additional model properties to the instance
|
|
46
|
+
additional_properties = {} if additional_properties.nil?
|
|
47
|
+
|
|
48
|
+
@company_name = company_name
|
|
49
|
+
@email = email
|
|
50
|
+
@phone = phone
|
|
51
|
+
@additional_properties = additional_properties
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Creates an instance of the object from a hash.
|
|
55
|
+
def self.from_hash(hash)
|
|
56
|
+
return nil unless hash
|
|
57
|
+
|
|
58
|
+
# Extract variables from the hash.
|
|
59
|
+
company_name = hash.key?('companyName') ? hash['companyName'] : nil
|
|
60
|
+
email = hash.key?('email') ? hash['email'] : nil
|
|
61
|
+
phone = hash.key?('phone') ? hash['phone'] : nil
|
|
62
|
+
|
|
63
|
+
# Create a new hash for additional properties, removing known properties.
|
|
64
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
65
|
+
|
|
66
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
67
|
+
new_hash, proc { |value| value }
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
# Create object from extracted values.
|
|
71
|
+
FactoringCompanyInput.new(company_name: company_name,
|
|
72
|
+
email: email,
|
|
73
|
+
phone: phone,
|
|
74
|
+
additional_properties: additional_properties)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Validates an instance of the object from a given value.
|
|
78
|
+
# @param [FactoringCompanyInput | Hash] The value against the validation is performed.
|
|
79
|
+
def self.validate(value)
|
|
80
|
+
if value.instance_of? self
|
|
81
|
+
return (
|
|
82
|
+
APIHelper.valid_type?(value.company_name,
|
|
83
|
+
->(val) { val.instance_of? String }) and
|
|
84
|
+
APIHelper.valid_type?(value.email,
|
|
85
|
+
->(val) { val.instance_of? String }) and
|
|
86
|
+
APIHelper.valid_type?(value.phone,
|
|
87
|
+
->(val) { val.instance_of? String })
|
|
88
|
+
)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
return false unless value.instance_of? Hash
|
|
92
|
+
|
|
93
|
+
(
|
|
94
|
+
APIHelper.valid_type?(value['companyName'],
|
|
95
|
+
->(val) { val.instance_of? String }) and
|
|
96
|
+
APIHelper.valid_type?(value['email'],
|
|
97
|
+
->(val) { val.instance_of? String }) and
|
|
98
|
+
APIHelper.valid_type?(value['phone'],
|
|
99
|
+
->(val) { val.instance_of? String })
|
|
100
|
+
)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Provides a human-readable string representation of the object.
|
|
104
|
+
def to_s
|
|
105
|
+
class_name = self.class.name.split('::').last
|
|
106
|
+
"<#{class_name} company_name: #{@company_name}, email: #{@email}, phone: #{@phone},"\
|
|
107
|
+
" additional_properties: #{@additional_properties}>"
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
111
|
+
def inspect
|
|
112
|
+
class_name = self.class.name.split('::').last
|
|
113
|
+
"<#{class_name} company_name: #{@company_name.inspect}, email: #{@email.inspect}, phone:"\
|
|
114
|
+
" #{@phone.inspect}, additional_properties: #{@additional_properties}>"
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|