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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f5a4f7b263108049a56409f08f9a2eda6892721f7372e9eac824c9f169b18924
|
|
4
|
+
data.tar.gz: 22dda9b183436153027b8aec4294644df2e1e6fade6dc86bab142d213f3a96fc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 81464d9b860c769148efddebc588d04856406b86d907c467c152c27b019e0cb2298e9123db9b2737069eaef5d6e58ec8756ee2eb3d60cb24d6212f7371823a6c
|
|
7
|
+
data.tar.gz: 15509a990832d41770c4927a9405abf4d80ba6b9fb17f8280047f1defbee35ac44aa70d6b4c69785a86ce14227f1d33d6b131f600cae4c4fe761b7a9737c7405
|
data/README.md
CHANGED
|
@@ -1,210 +1,161 @@
|
|
|
1
|
-
|
|
2
|
-
# Getting Started with
|
|
3
|
-
|
|
4
|
-
## Introduction
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
Now you can start the preconfigured irb console by running the following command
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
ruby bin/console
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
**_Note:_** This automatically loads the SDK from lib/
|
|
113
|
-
|
|
114
|
-
## Initialize the API Client
|
|
115
|
-
|
|
116
|
-
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.1/doc/client.md)
|
|
117
|
-
|
|
118
|
-
The following parameters are configurable for the API Client:
|
|
119
|
-
|
|
120
|
-
| Parameter | Type | Description |
|
|
121
|
-
| --- | --- | --- |
|
|
122
|
-
| connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
|
|
123
|
-
| adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
|
|
124
|
-
| timeout | `Float` | The value to use for connection timeout. <br> **Default: 30** |
|
|
125
|
-
| max_retries | `Integer` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
|
|
126
|
-
| retry_interval | `Float` | Pause in seconds between retries. <br> **Default: 1** |
|
|
127
|
-
| backoff_factor | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff. <br> **Default: 2** |
|
|
128
|
-
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
|
129
|
-
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
|
130
|
-
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
|
131
|
-
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.1/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
|
|
132
|
-
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.1/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
|
133
|
-
| client_credentials_auth_credentials | [`ClientCredentialsAuthCredentials`](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.1/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
|
|
134
|
-
|
|
135
|
-
The API client can be initialized as follows:
|
|
136
|
-
|
|
137
|
-
### Code-Based Client Initialization
|
|
138
|
-
|
|
139
|
-
```ruby
|
|
140
|
-
require 'tql_otr_factoring_data_exchange'
|
|
141
|
-
include TqlOtrFactoringDataExchange
|
|
1
|
+
|
|
2
|
+
# Getting Started with Freight Financials — Webhook Ingestion API
|
|
3
|
+
|
|
4
|
+
## Introduction
|
|
5
|
+
|
|
6
|
+
Receives real-time event callbacks from freight audit providers (currently [Navix](https://www.navix.io)) and publishes them to Kafka for downstream processing.
|
|
7
|
+
|
|
8
|
+
### Request Flow
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
Navix ──POST──▶ APIM ──validates key, stamps X-Tenant-Id──▶ Webhooks API ──publishes──▶ Kafka
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
1. **Navix** fires an HTTP callback when an event occurs (invoice created, dispute updated, etc.).
|
|
15
|
+
2. **Azure API Management (APIM)** authenticates the caller via subscription key or OAuth client credentials, then forwards the request with an `X-Tenant-Id` header identifying the tenant.
|
|
16
|
+
3. **This service** validates the tenant header, deserializes the Navix payload, maps it to a provider-agnostic domain event, and publishes it to a Kafka topic.
|
|
17
|
+
4. **Downstream consumers** (the Events function app) process the domain events asynchronously.
|
|
18
|
+
|
|
19
|
+
### Authentication
|
|
20
|
+
|
|
21
|
+
This API does **not** use Entra ID / OAuth for inbound requests. Authentication is handled at the APIM layer.
|
|
22
|
+
|
|
23
|
+
All requests must include the **`X-Tenant-Id`** header. Requests without this header receive a `401 Unauthorized` response.
|
|
24
|
+
|
|
25
|
+
When testing from Swagger UI, click the **Authorize** button and enter your tenant identifier in the `X-Tenant-Id` field.
|
|
26
|
+
|
|
27
|
+
## Install the Package
|
|
28
|
+
|
|
29
|
+
Install the gem from the command line:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
gem install apimatic-tql-sdk -v 0.0.2
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Or add the gem to your Gemfile and run `bundle`:
|
|
36
|
+
|
|
37
|
+
```ruby
|
|
38
|
+
gem 'apimatic-tql-sdk', '0.0.2'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
For additional gem details, see the [RubyGems page for the apimatic-tql-sdk gem](https://rubygems.org/gems/apimatic-tql-sdk/versions/0.0.2).
|
|
42
|
+
|
|
43
|
+
## IRB Console Usage
|
|
44
|
+
|
|
45
|
+
You can explore the SDK interactively using IRB in two ways
|
|
46
|
+
|
|
47
|
+
### 1. Use IRB with Installed Gem
|
|
48
|
+
|
|
49
|
+
Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and type the following command to start the irb console.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
irb
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Now you can load the SDK in the IRB
|
|
56
|
+
|
|
57
|
+
```ruby
|
|
58
|
+
require 'freight_financials_webhook_ingestion_api'
|
|
59
|
+
include FreightFinancialsWebhookIngestionApi
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 2. Use IRB within SDK
|
|
63
|
+
|
|
64
|
+
Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and navigate to the root folder of SDK.
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
cd path/to/freight_financials_webhook_ingestion_api
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Now you can start the preconfigured irb console by running the following command
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
ruby bin/console
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**_Note:_** This automatically loads the SDK from lib/
|
|
77
|
+
|
|
78
|
+
## Initialize the API Client
|
|
79
|
+
|
|
80
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/client.md)
|
|
81
|
+
|
|
82
|
+
The following parameters are configurable for the API Client:
|
|
83
|
+
|
|
84
|
+
| Parameter | Type | Description |
|
|
85
|
+
| --- | --- | --- |
|
|
86
|
+
| connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
|
|
87
|
+
| adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
|
|
88
|
+
| timeout | `Float` | The value to use for connection timeout. <br> **Default: 30** |
|
|
89
|
+
| max_retries | `Integer` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
|
|
90
|
+
| retry_interval | `Float` | Pause in seconds between retries. <br> **Default: 1** |
|
|
91
|
+
| backoff_factor | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff. <br> **Default: 2** |
|
|
92
|
+
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
|
93
|
+
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
|
94
|
+
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
|
95
|
+
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
|
|
96
|
+
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
|
97
|
+
|
|
98
|
+
The API client can be initialized as follows:
|
|
99
|
+
|
|
100
|
+
### Code-Based Client Initialization
|
|
101
|
+
|
|
102
|
+
```ruby
|
|
103
|
+
require 'freight_financials_webhook_ingestion_api'
|
|
104
|
+
include FreightFinancialsWebhookIngestionApi
|
|
142
105
|
|
|
143
106
|
client = Client.new(
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
logging_configuration: LoggingConfiguration.new(
|
|
153
|
-
log_level: Logger::INFO,
|
|
154
|
-
request_logging_config: RequestLoggingConfiguration.new(
|
|
155
|
-
log_body: true
|
|
156
|
-
),
|
|
157
|
-
response_logging_config: ResponseLoggingConfiguration.new(
|
|
158
|
-
log_headers: true
|
|
159
|
-
)
|
|
107
|
+
logging_configuration: LoggingConfiguration.new(
|
|
108
|
+
log_level: Logger::INFO,
|
|
109
|
+
request_logging_config: RequestLoggingConfiguration.new(
|
|
110
|
+
log_body: true
|
|
111
|
+
),
|
|
112
|
+
response_logging_config: ResponseLoggingConfiguration.new(
|
|
113
|
+
log_headers: true
|
|
114
|
+
)
|
|
160
115
|
)
|
|
161
|
-
)
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
### Environment-Based Client Initialization
|
|
165
|
-
|
|
166
|
-
```ruby
|
|
167
|
-
require '
|
|
168
|
-
include
|
|
116
|
+
)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Environment-Based Client Initialization
|
|
120
|
+
|
|
121
|
+
```ruby
|
|
122
|
+
require 'freight_financials_webhook_ingestion_api'
|
|
123
|
+
include FreightFinancialsWebhookIngestionApi
|
|
169
124
|
|
|
170
125
|
# Create client from environment
|
|
171
|
-
client = Client.from_env
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.
|
|
175
|
-
|
|
176
|
-
##
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
* [
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
* [Loads](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.1/doc/controllers/loads.md)
|
|
188
|
-
|
|
189
|
-
## SDK Infrastructure
|
|
190
|
-
|
|
126
|
+
client = Client.from_env
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/environment-based-client-initialization.md) section for details.
|
|
130
|
+
|
|
131
|
+
## List of APIs
|
|
132
|
+
|
|
133
|
+
* [Assignments](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/controllers/assignments.md)
|
|
134
|
+
* [Documents](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/controllers/documents.md)
|
|
135
|
+
* [Freight Audit](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/controllers/freight-audit.md)
|
|
136
|
+
* [Invoices](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/controllers/invoices.md)
|
|
137
|
+
* [Loads](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/controllers/loads.md)
|
|
138
|
+
* [Rating](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/controllers/rating.md)
|
|
139
|
+
|
|
140
|
+
## SDK Infrastructure
|
|
141
|
+
|
|
191
142
|
### Configuration
|
|
192
143
|
|
|
193
|
-
* [ProxySettings](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.
|
|
194
|
-
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.
|
|
195
|
-
* [AbstractLogger](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.
|
|
196
|
-
* [LoggingConfiguration](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.
|
|
197
|
-
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.
|
|
198
|
-
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.
|
|
144
|
+
* [ProxySettings](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/proxy-settings.md)
|
|
145
|
+
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/environment-based-client-initialization.md)
|
|
146
|
+
* [AbstractLogger](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/abstract-logger.md)
|
|
147
|
+
* [LoggingConfiguration](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/logging-configuration.md)
|
|
148
|
+
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/request-logging-configuration.md)
|
|
149
|
+
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/response-logging-configuration.md)
|
|
199
150
|
|
|
200
151
|
### HTTP
|
|
201
152
|
|
|
202
|
-
* [HttpResponse](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.
|
|
203
|
-
* [HttpRequest](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.
|
|
153
|
+
* [HttpResponse](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/http-response.md)
|
|
154
|
+
* [HttpRequest](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/http-request.md)
|
|
204
155
|
|
|
205
156
|
### Utilities
|
|
206
157
|
|
|
207
|
-
* [ApiResponse](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.
|
|
208
|
-
* [ApiHelper](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.
|
|
209
|
-
* [DateTimeHelper](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.
|
|
210
|
-
|
|
158
|
+
* [ApiResponse](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/api-response.md)
|
|
159
|
+
* [ApiHelper](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/api-helper.md)
|
|
160
|
+
* [DateTimeHelper](https://www.github.com/sdks-io/apimatic-tql-ruby-sdk/tree/0.0.2/doc/date-time-helper.md)
|
|
161
|
+
|
data/bin/console
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
$LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
|
|
5
5
|
|
|
6
6
|
# Require the gem
|
|
7
|
-
require '
|
|
7
|
+
require 'freight_financials_webhook_ingestion_api'
|
|
8
8
|
|
|
9
|
-
puts '
|
|
10
|
-
puts 'You can now create a client with: client =
|
|
11
|
-
puts 'Or use from_env: client =
|
|
9
|
+
puts 'FreightFinancialsWebhookIngestionApi SDK loaded!'
|
|
10
|
+
puts 'You can now create a client with: client = FreightFinancialsWebhookIngestionApi::Client.new'
|
|
11
|
+
puts 'Or use from_env: client = FreightFinancialsWebhookIngestionApi::Client.from_env'
|
|
12
12
|
|
|
13
13
|
# Start an interactive IRB session
|
|
14
14
|
require 'irb'
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
# API utility class
|
|
8
|
+
class APIHelper < CoreLibrary::ApiHelper
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
# AssignmentsApi
|
|
8
|
+
class AssignmentsApi < 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 [AssignmentRequest] 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 assign_or_unassign_factoring_company(x_tenant_id,
|
|
17
|
+
body,
|
|
18
|
+
api_version: nil)
|
|
19
|
+
@api_call
|
|
20
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
21
|
+
'/api/v1/Assignments',
|
|
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(AssignmentResponse.method(:from_hash))
|
|
34
|
+
.is_api_response(true)
|
|
35
|
+
.local_error('400',
|
|
36
|
+
'Missing required fields or invalid data.',
|
|
37
|
+
ProblemDetailsException))
|
|
38
|
+
.execute
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically
|
|
4
|
-
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
-
|
|
6
|
-
module
|
|
7
|
-
# BaseApi.
|
|
8
|
-
class BaseApi
|
|
9
|
-
include CoreLibrary
|
|
10
|
-
attr_accessor :config, :http_call_back
|
|
11
|
-
|
|
12
|
-
def self.user_agent
|
|
13
|
-
'Ruby-SDK/0.0.
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def self.user_agent_parameters
|
|
17
|
-
{
|
|
18
|
-
'{engine}' => { 'value' => RUBY_ENGINE, 'encode' => false },
|
|
19
|
-
'{engine-version}' => { 'value' => RUBY_ENGINE_VERSION, 'encode' => false },
|
|
20
|
-
'{os-info}' => { 'value' => RUBY_PLATFORM, 'encode' => false }
|
|
21
|
-
}
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
GLOBAL_ERRORS = {
|
|
25
|
-
'default' => ErrorCase.new
|
|
26
|
-
.error_message('HTTP response not OK.')
|
|
27
|
-
.exception_type(APIException)
|
|
28
|
-
}.freeze
|
|
29
|
-
|
|
30
|
-
# Initialization constructor.
|
|
31
|
-
# @param [GlobalConfiguration] global_configuration The instance of GlobalConfiguration.
|
|
32
|
-
def initialize(global_configuration)
|
|
33
|
-
@global_configuration = global_configuration
|
|
34
|
-
@config = @global_configuration.client_configuration
|
|
35
|
-
@http_call_back = @config.http_callback
|
|
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
|
+
# BaseApi.
|
|
8
|
+
class BaseApi
|
|
9
|
+
include CoreLibrary
|
|
10
|
+
attr_accessor :config, :http_call_back
|
|
11
|
+
|
|
12
|
+
def self.user_agent
|
|
13
|
+
'Ruby-SDK/0.0.2 (OS: {os-info}, Engine: {engine}/{engine-version})'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.user_agent_parameters
|
|
17
|
+
{
|
|
18
|
+
'{engine}' => { 'value' => RUBY_ENGINE, 'encode' => false },
|
|
19
|
+
'{engine-version}' => { 'value' => RUBY_ENGINE_VERSION, 'encode' => false },
|
|
20
|
+
'{os-info}' => { 'value' => RUBY_PLATFORM, 'encode' => false }
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
GLOBAL_ERRORS = {
|
|
25
|
+
'default' => ErrorCase.new
|
|
26
|
+
.error_message('HTTP response not OK.')
|
|
27
|
+
.exception_type(APIException)
|
|
28
|
+
}.freeze
|
|
29
|
+
|
|
30
|
+
# Initialization constructor.
|
|
31
|
+
# @param [GlobalConfiguration] global_configuration The instance of GlobalConfiguration.
|
|
32
|
+
def initialize(global_configuration)
|
|
33
|
+
@global_configuration = global_configuration
|
|
34
|
+
@config = @global_configuration.client_configuration
|
|
35
|
+
@http_call_back = @config.http_callback
|
|
36
36
|
@api_call = ApiCall.new(@global_configuration)
|
|
37
37
|
end
|
|
38
38
|
|
|
@@ -40,28 +40,28 @@ module TqlOtrFactoringDataExchange
|
|
|
40
40
|
# @param [String] http_method The HTTP method to use in the request.
|
|
41
41
|
# @param [String] path The endpoint path to use in the request.
|
|
42
42
|
# @param [String] server The server to extract the base uri for the request.
|
|
43
|
-
# @return [RequestBuilder] The instance of RequestBuilder.
|
|
44
|
-
def new_request_builder(http_method, path, server)
|
|
45
|
-
RequestBuilder.new
|
|
46
|
-
.http_method(http_method)
|
|
47
|
-
.path(path)
|
|
48
|
-
.server(server)
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
# Creates a new instance of the response handler.
|
|
52
|
-
# @return [ResponseHandler] The instance of ResponseHandler.
|
|
53
|
-
def new_response_handler
|
|
54
|
-
ResponseHandler.new
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
# Creates a new instance of the parameter.
|
|
58
|
-
# @param [String|optional] key The key of the parameter.
|
|
59
|
-
# @param [Object] value The value of the parameter.
|
|
60
|
-
# @return [Parameter] The instance of Parameter.
|
|
61
|
-
def new_parameter(value, key: nil)
|
|
62
|
-
Parameter.new
|
|
63
|
-
.key(key)
|
|
64
|
-
.value(value)
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
end
|
|
43
|
+
# @return [RequestBuilder] The instance of RequestBuilder.
|
|
44
|
+
def new_request_builder(http_method, path, server)
|
|
45
|
+
RequestBuilder.new
|
|
46
|
+
.http_method(http_method)
|
|
47
|
+
.path(path)
|
|
48
|
+
.server(server)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Creates a new instance of the response handler.
|
|
52
|
+
# @return [ResponseHandler] The instance of ResponseHandler.
|
|
53
|
+
def new_response_handler
|
|
54
|
+
ResponseHandler.new
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Creates a new instance of the parameter.
|
|
58
|
+
# @param [String|optional] key The key of the parameter.
|
|
59
|
+
# @param [Object] value The value of the parameter.
|
|
60
|
+
# @return [Parameter] The instance of Parameter.
|
|
61
|
+
def new_parameter(value, key: nil)
|
|
62
|
+
Parameter.new
|
|
63
|
+
.key(key)
|
|
64
|
+
.value(value)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|