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
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
# DocumentsApi
|
|
8
|
+
class DocumentsApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] x_tenant_id Required parameter: Tenant identifier stamped
|
|
11
|
+
# by APIM. Required on all requests.
|
|
12
|
+
# @param [Object] body Required parameter: Cancellation token.
|
|
13
|
+
# @param [String] api_version Optional parameter: TODO: type description
|
|
14
|
+
# here
|
|
15
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
16
|
+
def upload_document(x_tenant_id,
|
|
17
|
+
body,
|
|
18
|
+
api_version: nil)
|
|
19
|
+
@api_call
|
|
20
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
21
|
+
'/api/v1/Documents',
|
|
22
|
+
Server::DEFAULT)
|
|
23
|
+
.header_param(new_parameter(x_tenant_id, key: 'X-Tenant-Id')
|
|
24
|
+
.is_required(true))
|
|
25
|
+
.body_param(new_parameter(body)
|
|
26
|
+
.is_required(true))
|
|
27
|
+
.query_param(new_parameter(api_version, key: 'api-version'))
|
|
28
|
+
.header_param(new_parameter('application/json; charset=utf-8', key: 'content-type'))
|
|
29
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
30
|
+
.body_serializer(APIHelper.method(:json_serialize)))
|
|
31
|
+
.response(new_response_handler
|
|
32
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
33
|
+
.deserialize_into(UploadResponse.method(:from_hash))
|
|
34
|
+
.is_api_response(true)
|
|
35
|
+
.local_error('400',
|
|
36
|
+
'Missing required fields or invalid document type.',
|
|
37
|
+
ProblemDetailsException))
|
|
38
|
+
.execute
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# TODO: type endpoint description here
|
|
42
|
+
# @param [String] x_tenant_id Required parameter: Tenant identifier stamped
|
|
43
|
+
# by APIM. Required on all requests.
|
|
44
|
+
# @param [UploadRequest] body Required parameter: Cancellation token.
|
|
45
|
+
# @param [String] api_version Optional parameter: TODO: type description
|
|
46
|
+
# here
|
|
47
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
48
|
+
def upload_document_base64(x_tenant_id,
|
|
49
|
+
body,
|
|
50
|
+
api_version: nil)
|
|
51
|
+
@api_call
|
|
52
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
53
|
+
'/api/v1/Documents/base64',
|
|
54
|
+
Server::DEFAULT)
|
|
55
|
+
.header_param(new_parameter(x_tenant_id, key: 'X-Tenant-Id')
|
|
56
|
+
.is_required(true))
|
|
57
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
58
|
+
.body_param(new_parameter(body)
|
|
59
|
+
.is_required(true))
|
|
60
|
+
.query_param(new_parameter(api_version, key: 'api-version'))
|
|
61
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
62
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
63
|
+
.response(new_response_handler
|
|
64
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
65
|
+
.deserialize_into(UploadResponse.method(:from_hash))
|
|
66
|
+
.is_api_response(true)
|
|
67
|
+
.local_error('400',
|
|
68
|
+
'Missing required fields or invalid document type.',
|
|
69
|
+
ProblemDetailsException))
|
|
70
|
+
.execute
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
# FreightAuditApi
|
|
8
|
+
class FreightAuditApi < BaseApi
|
|
9
|
+
# The catch-all {*path} route parameter allows Navix to target any
|
|
10
|
+
# sub-path
|
|
11
|
+
# (e.g., /api/v1/FreightAudit/navix, /api/v1/FreightAudit/navix/invoices).
|
|
12
|
+
# The path value is captured for logging but does not affect processing.
|
|
13
|
+
# @param [String] path Required parameter: Optional sub-path captured from
|
|
14
|
+
# the URL (for logging only).
|
|
15
|
+
# @param [String] x_tenant_id Required parameter: Tenant identifier stamped
|
|
16
|
+
# by APIM. Required on all requests.
|
|
17
|
+
# @param [NavixWebhookRequest] body Required parameter: Token to cancel the
|
|
18
|
+
# operation.
|
|
19
|
+
# @param [String] api_version Optional parameter: TODO: type description
|
|
20
|
+
# here
|
|
21
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
22
|
+
def receive_navix_webhook(path,
|
|
23
|
+
x_tenant_id,
|
|
24
|
+
body,
|
|
25
|
+
api_version: nil)
|
|
26
|
+
@api_call
|
|
27
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
28
|
+
'/api/v1/FreightAudit/{path}',
|
|
29
|
+
Server::DEFAULT)
|
|
30
|
+
.template_param(new_parameter(path, key: 'path')
|
|
31
|
+
.is_required(true)
|
|
32
|
+
.should_encode(true))
|
|
33
|
+
.header_param(new_parameter(x_tenant_id, key: 'X-Tenant-Id')
|
|
34
|
+
.is_required(true))
|
|
35
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
36
|
+
.body_param(new_parameter(body)
|
|
37
|
+
.is_required(true))
|
|
38
|
+
.query_param(new_parameter(api_version, key: 'api-version'))
|
|
39
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
40
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
41
|
+
.response(new_response_handler
|
|
42
|
+
.deserializer(APIHelper.method(:dynamic_deserializer))
|
|
43
|
+
.is_api_response(true)
|
|
44
|
+
.local_error('400',
|
|
45
|
+
'The request body could not be deserialized into a valid Navix'\
|
|
46
|
+
' webhook payload.',
|
|
47
|
+
ProblemDetailsException)
|
|
48
|
+
.local_error('401',
|
|
49
|
+
'The `X-Tenant-Id` header is missing or empty.',
|
|
50
|
+
ProblemDetailsException))
|
|
51
|
+
.execute
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
# InvoicesApi
|
|
8
|
+
class InvoicesApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] x_tenant_id Required parameter: Tenant identifier stamped
|
|
11
|
+
# by APIM. Required on all requests.
|
|
12
|
+
# @param [SubmitInvoiceRequest] body Required parameter: Cancellation
|
|
13
|
+
# token.
|
|
14
|
+
# @param [String] api_version Optional parameter: TODO: type description
|
|
15
|
+
# here
|
|
16
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
17
|
+
def submit_invoice(x_tenant_id,
|
|
18
|
+
body,
|
|
19
|
+
api_version: nil)
|
|
20
|
+
@api_call
|
|
21
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
22
|
+
'/api/v1/Invoices',
|
|
23
|
+
Server::DEFAULT)
|
|
24
|
+
.header_param(new_parameter(x_tenant_id, key: 'X-Tenant-Id')
|
|
25
|
+
.is_required(true))
|
|
26
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
27
|
+
.body_param(new_parameter(body)
|
|
28
|
+
.is_required(true))
|
|
29
|
+
.query_param(new_parameter(api_version, key: 'api-version'))
|
|
30
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
31
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
32
|
+
.response(new_response_handler
|
|
33
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
34
|
+
.deserialize_into(SubmitInvoiceResponse.method(:from_hash))
|
|
35
|
+
.is_api_response(true)
|
|
36
|
+
.local_error('400',
|
|
37
|
+
'The request body is missing required fields or contains'\
|
|
38
|
+
' invalid data.',
|
|
39
|
+
ProblemDetailsException))
|
|
40
|
+
.execute
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# TODO: type endpoint description here
|
|
44
|
+
# @param [String] x_tenant_id Required parameter: Tenant identifier stamped
|
|
45
|
+
# by APIM. Required on all requests.
|
|
46
|
+
# @param [SearchRequest] body Required parameter: Cancellation token.
|
|
47
|
+
# @param [String] api_version Optional parameter: TODO: type description
|
|
48
|
+
# here
|
|
49
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
50
|
+
def search_invoices(x_tenant_id,
|
|
51
|
+
body,
|
|
52
|
+
api_version: nil)
|
|
53
|
+
@api_call
|
|
54
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
55
|
+
'/api/v1/Invoices/search',
|
|
56
|
+
Server::DEFAULT)
|
|
57
|
+
.header_param(new_parameter(x_tenant_id, key: 'X-Tenant-Id')
|
|
58
|
+
.is_required(true))
|
|
59
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
60
|
+
.body_param(new_parameter(body)
|
|
61
|
+
.is_required(true))
|
|
62
|
+
.query_param(new_parameter(api_version, key: 'api-version'))
|
|
63
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
64
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
65
|
+
.response(new_response_handler
|
|
66
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
67
|
+
.deserialize_into(SearchResponse.method(:from_hash))
|
|
68
|
+
.is_api_response(true)
|
|
69
|
+
.local_error('400',
|
|
70
|
+
'Invalid filter criteria or pagination parameters.',
|
|
71
|
+
ProblemDetailsException))
|
|
72
|
+
.execute
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# TODO: type endpoint description here
|
|
76
|
+
# @param [String] invoice_number Required parameter: The factoring company's
|
|
77
|
+
# invoice number.
|
|
78
|
+
# @param [String] x_tenant_id Required parameter: Tenant identifier stamped
|
|
79
|
+
# by APIM. Required on all requests.
|
|
80
|
+
# @param [String] api_version Optional parameter: TODO: type description
|
|
81
|
+
# here
|
|
82
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
83
|
+
def get_invoice_status(invoice_number,
|
|
84
|
+
x_tenant_id,
|
|
85
|
+
api_version: nil)
|
|
86
|
+
@api_call
|
|
87
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
88
|
+
'/api/v1/Invoices/{invoiceNumber}',
|
|
89
|
+
Server::DEFAULT)
|
|
90
|
+
.template_param(new_parameter(invoice_number, key: 'invoiceNumber')
|
|
91
|
+
.is_required(true)
|
|
92
|
+
.should_encode(true))
|
|
93
|
+
.header_param(new_parameter(x_tenant_id, key: 'X-Tenant-Id')
|
|
94
|
+
.is_required(true))
|
|
95
|
+
.query_param(new_parameter(api_version, key: 'api-version'))
|
|
96
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
97
|
+
.response(new_response_handler
|
|
98
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
99
|
+
.deserialize_into(InvoiceStatusResponse.method(:from_hash))
|
|
100
|
+
.is_api_response(true)
|
|
101
|
+
.local_error('404',
|
|
102
|
+
'No invoice exists with the specified invoice number.',
|
|
103
|
+
ProblemDetailsException))
|
|
104
|
+
.execute
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
# LoadsApi
|
|
8
|
+
class LoadsApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] x_tenant_id Required parameter: Tenant identifier stamped
|
|
11
|
+
# by APIM. Required on all requests.
|
|
12
|
+
# @param [SearchRequest] body Required parameter: Cancellation token.
|
|
13
|
+
# @param [String] api_version Optional parameter: TODO: type description
|
|
14
|
+
# here
|
|
15
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
16
|
+
def search_loads(x_tenant_id,
|
|
17
|
+
body,
|
|
18
|
+
api_version: nil)
|
|
19
|
+
@api_call
|
|
20
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
21
|
+
'/api/v1/Loads/search',
|
|
22
|
+
Server::DEFAULT)
|
|
23
|
+
.header_param(new_parameter(x_tenant_id, key: 'X-Tenant-Id')
|
|
24
|
+
.is_required(true))
|
|
25
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
26
|
+
.body_param(new_parameter(body)
|
|
27
|
+
.is_required(true))
|
|
28
|
+
.query_param(new_parameter(api_version, key: 'api-version'))
|
|
29
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
30
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
31
|
+
.response(new_response_handler
|
|
32
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
33
|
+
.deserialize_into(SearchResponse.method(:from_hash))
|
|
34
|
+
.is_api_response(true)
|
|
35
|
+
.local_error('400',
|
|
36
|
+
'Invalid filter criteria or pagination parameters.',
|
|
37
|
+
ProblemDetailsException))
|
|
38
|
+
.execute
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# TODO: type endpoint description here
|
|
42
|
+
# @param [String] load_number Required parameter: The TQL load number.
|
|
43
|
+
# @param [String] x_tenant_id Required parameter: Tenant identifier stamped
|
|
44
|
+
# by APIM. Required on all requests.
|
|
45
|
+
# @param [String] api_version Optional parameter: TODO: type description
|
|
46
|
+
# here
|
|
47
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
48
|
+
def get_load(load_number,
|
|
49
|
+
x_tenant_id,
|
|
50
|
+
api_version: nil)
|
|
51
|
+
@api_call
|
|
52
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
53
|
+
'/api/v1/Loads/{loadNumber}',
|
|
54
|
+
Server::DEFAULT)
|
|
55
|
+
.template_param(new_parameter(load_number, key: 'loadNumber')
|
|
56
|
+
.is_required(true)
|
|
57
|
+
.should_encode(true))
|
|
58
|
+
.header_param(new_parameter(x_tenant_id, key: 'X-Tenant-Id')
|
|
59
|
+
.is_required(true))
|
|
60
|
+
.query_param(new_parameter(api_version, key: 'api-version'))
|
|
61
|
+
.header_param(new_parameter('application/json', key: 'accept')))
|
|
62
|
+
.response(new_response_handler
|
|
63
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
64
|
+
.deserialize_into(LoadResponse.method(:from_hash))
|
|
65
|
+
.is_api_response(true)
|
|
66
|
+
.local_error('404',
|
|
67
|
+
'No load exists with the specified load number.',
|
|
68
|
+
ProblemDetailsException))
|
|
69
|
+
.execute
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
# RatingApi
|
|
8
|
+
class RatingApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [String] x_tenant_id Required parameter: Tenant identifier stamped
|
|
11
|
+
# by APIM. Required on all requests.
|
|
12
|
+
# @param [NavixRateRequest] body Required parameter: Cancellation token.
|
|
13
|
+
# @param [String] api_version Optional parameter: TODO: type description
|
|
14
|
+
# here
|
|
15
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
16
|
+
def rate_invoice(x_tenant_id,
|
|
17
|
+
body,
|
|
18
|
+
api_version: nil)
|
|
19
|
+
@api_call
|
|
20
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
21
|
+
'/api/v1/rating',
|
|
22
|
+
Server::DEFAULT)
|
|
23
|
+
.header_param(new_parameter(x_tenant_id, key: 'X-Tenant-Id')
|
|
24
|
+
.is_required(true))
|
|
25
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
26
|
+
.body_param(new_parameter(body)
|
|
27
|
+
.is_required(true))
|
|
28
|
+
.query_param(new_parameter(api_version, key: 'api-version'))
|
|
29
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
30
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
31
|
+
.response(new_response_handler
|
|
32
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
33
|
+
.deserialize_into(NavixRateResponse.method(:from_hash))
|
|
34
|
+
.is_api_response(true)
|
|
35
|
+
.local_error('400',
|
|
36
|
+
'The request body was missing, unparseable, or lacked the'\
|
|
37
|
+
' invoice/order identifiers.',
|
|
38
|
+
ProblemDetailsException)
|
|
39
|
+
.local_error('401',
|
|
40
|
+
'The `X-Tenant-Id` header is missing or empty.',
|
|
41
|
+
ProblemDetailsException))
|
|
42
|
+
.execute
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/client.rb
RENAMED
|
@@ -1,104 +1,90 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically
|
|
4
|
-
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
-
|
|
6
|
-
module TqlOtrFactoringDataExchange
|
|
7
|
-
# tql_otr_factoring_data_exchange client class.
|
|
8
|
-
class Client
|
|
9
|
-
include CoreLibrary
|
|
10
|
-
attr_reader :config, :auth_managers
|
|
11
|
-
|
|
12
|
-
def user_agent_detail
|
|
13
|
-
config.user_agent_detail
|
|
14
|
-
end
|
|
1
|
+
# freight_financials_webhook_ingestion_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically
|
|
4
|
+
# generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
15
5
|
|
|
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
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
@auth_managers['bearerAuth'] = Oauth2.new(
|
|
93
|
-
http_client_config.client_credentials_auth_credentials, global_config
|
|
94
|
-
)
|
|
95
|
-
end
|
|
6
|
+
module FreightFinancialsWebhookIngestionApi
|
|
7
|
+
# freight_financials_webhook_ingestion_api client class.
|
|
8
|
+
class Client
|
|
9
|
+
include CoreLibrary
|
|
10
|
+
attr_reader :config
|
|
11
|
+
|
|
12
|
+
def user_agent_detail
|
|
13
|
+
config.user_agent_detail
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Access to assignments controller.
|
|
17
|
+
# @return [AssignmentsApi] Returns the controller instance.
|
|
18
|
+
def assignments
|
|
19
|
+
@assignments ||= AssignmentsApi.new @global_configuration
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Access to documents controller.
|
|
23
|
+
# @return [DocumentsApi] Returns the controller instance.
|
|
24
|
+
def documents
|
|
25
|
+
@documents ||= DocumentsApi.new @global_configuration
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Access to freight_audit controller.
|
|
29
|
+
# @return [FreightAuditApi] Returns the controller instance.
|
|
30
|
+
def freight_audit
|
|
31
|
+
@freight_audit ||= FreightAuditApi.new @global_configuration
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Access to invoices controller.
|
|
35
|
+
# @return [InvoicesApi] Returns the controller instance.
|
|
36
|
+
def invoices
|
|
37
|
+
@invoices ||= InvoicesApi.new @global_configuration
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Access to loads controller.
|
|
41
|
+
# @return [LoadsApi] Returns the controller instance.
|
|
42
|
+
def loads
|
|
43
|
+
@loads ||= LoadsApi.new @global_configuration
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Access to rating controller.
|
|
47
|
+
# @return [RatingApi] Returns the controller instance.
|
|
48
|
+
def rating
|
|
49
|
+
@rating ||= RatingApi.new @global_configuration
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def initialize(
|
|
53
|
+
connection: nil, adapter: :net_http_persistent, timeout: 30,
|
|
54
|
+
max_retries: 0, retry_interval: 1, backoff_factor: 2,
|
|
55
|
+
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
|
56
|
+
retry_methods: %i[get put], http_callback: nil, proxy_settings: nil,
|
|
57
|
+
logging_configuration: nil, environment: Environment::PRODUCTION,
|
|
58
|
+
config: nil
|
|
59
|
+
)
|
|
60
|
+
@config = if config.nil?
|
|
61
|
+
Configuration.new(
|
|
62
|
+
connection: connection, adapter: adapter, timeout: timeout,
|
|
63
|
+
max_retries: max_retries, retry_interval: retry_interval,
|
|
64
|
+
backoff_factor: backoff_factor,
|
|
65
|
+
retry_statuses: retry_statuses,
|
|
66
|
+
retry_methods: retry_methods, http_callback: http_callback,
|
|
67
|
+
proxy_settings: proxy_settings,
|
|
68
|
+
logging_configuration: logging_configuration,
|
|
69
|
+
environment: environment
|
|
70
|
+
)
|
|
71
|
+
else
|
|
72
|
+
config
|
|
73
|
+
end
|
|
74
|
+
user_agent_params = BaseApi.user_agent_parameters
|
|
75
|
+
|
|
76
|
+
@global_configuration = GlobalConfiguration.new(client_configuration: @config)
|
|
77
|
+
.base_uri_executor(@config.method(:get_base_uri))
|
|
78
|
+
.global_errors(BaseApi::GLOBAL_ERRORS)
|
|
79
|
+
.user_agent(BaseApi.user_agent,
|
|
80
|
+
agent_parameters: user_agent_params)
|
|
81
|
+
end
|
|
96
82
|
|
|
97
83
|
# Creates a client directly from environment variables.
|
|
98
84
|
def self.from_env(**overrides)
|
|
99
85
|
default_config = Configuration.build_default_config_from_env
|
|
100
86
|
new_config = default_config.clone_with(**overrides)
|
|
101
87
|
new(config: new_config)
|
|
102
|
-
end
|
|
103
|
-
end
|
|
104
|
-
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|