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.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +148 -197
  3. data/bin/console +4 -4
  4. data/lib/freight_financials_webhook_ingestion_api/api_helper.rb +10 -0
  5. data/lib/freight_financials_webhook_ingestion_api/apis/assignments_api.rb +41 -0
  6. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/apis/base_api.rb +60 -60
  7. data/lib/freight_financials_webhook_ingestion_api/apis/documents_api.rb +73 -0
  8. data/lib/freight_financials_webhook_ingestion_api/apis/freight_audit_api.rb +54 -0
  9. data/lib/freight_financials_webhook_ingestion_api/apis/invoices_api.rb +107 -0
  10. data/lib/freight_financials_webhook_ingestion_api/apis/loads_api.rb +72 -0
  11. data/lib/freight_financials_webhook_ingestion_api/apis/rating_api.rb +45 -0
  12. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/client.rb +83 -97
  13. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/configuration.rb +114 -126
  14. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/exceptions/api_exception.rb +21 -21
  15. 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
  16. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/http/api_response.rb +7 -7
  17. data/lib/freight_financials_webhook_ingestion_api/http/http_call_back.rb +10 -0
  18. data/lib/freight_financials_webhook_ingestion_api/http/http_method_enum.rb +10 -0
  19. data/lib/freight_financials_webhook_ingestion_api/http/http_request.rb +10 -0
  20. data/lib/freight_financials_webhook_ingestion_api/http/http_response.rb +10 -0
  21. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/http/proxy_settings.rb +6 -6
  22. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/logging/configuration/api_logging_configuration.rb +6 -6
  23. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/logging/sdk_logger.rb +6 -6
  24. data/lib/freight_financials_webhook_ingestion_api/models/address.rb +123 -0
  25. data/lib/freight_financials_webhook_ingestion_api/models/assignment_request.rb +94 -0
  26. data/lib/freight_financials_webhook_ingestion_api/models/assignment_response.rb +83 -0
  27. data/lib/{tql_otr_factoring_data_exchange/models/assignment_response.rb → freight_financials_webhook_ingestion_api/models/assignment_response_data.rb} +124 -126
  28. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/models/base_model.rb +110 -110
  29. data/lib/{tql_otr_factoring_data_exchange/models/carrier1.rb → freight_financials_webhook_ingestion_api/models/carrier.rb} +96 -98
  30. data/lib/freight_financials_webhook_ingestion_api/models/charge.rb +104 -0
  31. data/lib/freight_financials_webhook_ingestion_api/models/charge_code.rb +81 -0
  32. data/lib/freight_financials_webhook_ingestion_api/models/factoring_company.rb +81 -0
  33. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/models/invoice.rb +204 -223
  34. data/lib/{tql_otr_factoring_data_exchange/models/document.rb → freight_financials_webhook_ingestion_api/models/invoice_document.rb} +72 -86
  35. data/lib/{tql_otr_factoring_data_exchange/models/invoice_exception.rb → freight_financials_webhook_ingestion_api/models/invoice_issue.rb} +122 -136
  36. data/lib/freight_financials_webhook_ingestion_api/models/invoice_status_response.rb +83 -0
  37. 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
  38. data/lib/freight_financials_webhook_ingestion_api/models/line_item.rb +131 -0
  39. data/lib/freight_financials_webhook_ingestion_api/models/load_response.rb +83 -0
  40. data/lib/{tql_otr_factoring_data_exchange/models/load_detail.rb → freight_financials_webhook_ingestion_api/models/load_response_data.rb} +141 -140
  41. data/lib/{tql_otr_factoring_data_exchange/models/load.rb → freight_financials_webhook_ingestion_api/models/load_slim.rb} +97 -110
  42. data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb +116 -0
  43. data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_customer.rb +64 -0
  44. data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb +177 -0
  45. data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_request.rb +208 -0
  46. data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_requested_charge.rb +64 -0
  47. data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_response.rb +112 -0
  48. data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb +107 -0
  49. data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_vendor.rb +88 -0
  50. data/lib/freight_financials_webhook_ingestion_api/models/navix_webhook_event_type.rb +56 -0
  51. data/lib/freight_financials_webhook_ingestion_api/models/navix_webhook_request.rb +99 -0
  52. data/lib/freight_financials_webhook_ingestion_api/models/paged_response_of_invoice.rb +111 -0
  53. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/models/payment.rb +94 -108
  54. data/lib/freight_financials_webhook_ingestion_api/models/rating_charge_qualifier.rb +68 -0
  55. data/lib/freight_financials_webhook_ingestion_api/models/rating_response_format.rb +40 -0
  56. data/lib/freight_financials_webhook_ingestion_api/models/reference_number.rb +71 -0
  57. data/lib/{tql_otr_factoring_data_exchange/models/invoice_search_request.rb → freight_financials_webhook_ingestion_api/models/search_request.rb} +223 -242
  58. data/lib/freight_financials_webhook_ingestion_api/models/search_response.rb +83 -0
  59. data/lib/freight_financials_webhook_ingestion_api/models/stop.rb +81 -0
  60. data/lib/freight_financials_webhook_ingestion_api/models/submit_invoice_request.rb +228 -0
  61. data/lib/freight_financials_webhook_ingestion_api/models/submit_invoice_response.rb +83 -0
  62. 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
  63. data/lib/freight_financials_webhook_ingestion_api/models/upload_request.rb +128 -0
  64. data/lib/freight_financials_webhook_ingestion_api/models/upload_response.rb +83 -0
  65. data/lib/{tql_otr_factoring_data_exchange/models/document_upload_response.rb → freight_financials_webhook_ingestion_api/models/upload_response_data.rb} +117 -137
  66. data/lib/freight_financials_webhook_ingestion_api/utilities/date_time_helper.rb +11 -0
  67. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/utilities/file_wrapper.rb +17 -17
  68. data/lib/freight_financials_webhook_ingestion_api.rb +127 -0
  69. metadata +67 -74
  70. data/lib/tql_otr_factoring_data_exchange/api_helper.rb +0 -10
  71. data/lib/tql_otr_factoring_data_exchange/apis/assignments_api.rb +0 -45
  72. data/lib/tql_otr_factoring_data_exchange/apis/documents_api.rb +0 -82
  73. data/lib/tql_otr_factoring_data_exchange/apis/invoices_api.rb +0 -114
  74. data/lib/tql_otr_factoring_data_exchange/apis/loads_api.rb +0 -68
  75. data/lib/tql_otr_factoring_data_exchange/apis/oauth_authorization_api.rb +0 -44
  76. data/lib/tql_otr_factoring_data_exchange/exceptions/oauth_provider_exception.rb +0 -64
  77. data/lib/tql_otr_factoring_data_exchange/http/auth/oauth_2.rb +0 -156
  78. data/lib/tql_otr_factoring_data_exchange/http/http_call_back.rb +0 -10
  79. data/lib/tql_otr_factoring_data_exchange/http/http_method_enum.rb +0 -10
  80. data/lib/tql_otr_factoring_data_exchange/http/http_request.rb +0 -10
  81. data/lib/tql_otr_factoring_data_exchange/http/http_response.rb +0 -10
  82. data/lib/tql_otr_factoring_data_exchange/models/assignment_request.rb +0 -140
  83. data/lib/tql_otr_factoring_data_exchange/models/assignment_status.rb +0 -36
  84. data/lib/tql_otr_factoring_data_exchange/models/base64_document.rb +0 -118
  85. data/lib/tql_otr_factoring_data_exchange/models/base64_document_upload_request.rb +0 -107
  86. data/lib/tql_otr_factoring_data_exchange/models/carrier.rb +0 -98
  87. data/lib/tql_otr_factoring_data_exchange/models/carrier2.rb +0 -98
  88. data/lib/tql_otr_factoring_data_exchange/models/carrier_input.rb +0 -123
  89. data/lib/tql_otr_factoring_data_exchange/models/carrier_input1.rb +0 -123
  90. data/lib/tql_otr_factoring_data_exchange/models/charge_code.rb +0 -126
  91. data/lib/tql_otr_factoring_data_exchange/models/charge_code_origin.rb +0 -49
  92. data/lib/tql_otr_factoring_data_exchange/models/charge_input.rb +0 -146
  93. data/lib/tql_otr_factoring_data_exchange/models/document_type.rb +0 -288
  94. data/lib/tql_otr_factoring_data_exchange/models/document_upload_metadata.rb +0 -111
  95. data/lib/tql_otr_factoring_data_exchange/models/exception_severity.rb +0 -40
  96. data/lib/tql_otr_factoring_data_exchange/models/factoring_company_input.rb +0 -117
  97. data/lib/tql_otr_factoring_data_exchange/models/invoice_item_input.rb +0 -165
  98. data/lib/tql_otr_factoring_data_exchange/models/invoice_search_response.rb +0 -124
  99. data/lib/tql_otr_factoring_data_exchange/models/invoice_status.rb +0 -74
  100. data/lib/tql_otr_factoring_data_exchange/models/invoice_type.rb +0 -50
  101. data/lib/tql_otr_factoring_data_exchange/models/load_search_request.rb +0 -205
  102. data/lib/tql_otr_factoring_data_exchange/models/load_search_response.rb +0 -124
  103. data/lib/tql_otr_factoring_data_exchange/models/load_status.rb +0 -56
  104. data/lib/tql_otr_factoring_data_exchange/models/location.rb +0 -149
  105. data/lib/tql_otr_factoring_data_exchange/models/oauth_provider_error.rb +0 -62
  106. data/lib/tql_otr_factoring_data_exchange/models/oauth_scope.rb +0 -36
  107. data/lib/tql_otr_factoring_data_exchange/models/oauth_token.rb +0 -96
  108. data/lib/tql_otr_factoring_data_exchange/models/problem_details.rb +0 -96
  109. data/lib/tql_otr_factoring_data_exchange/models/reference_number_input.rb +0 -109
  110. data/lib/tql_otr_factoring_data_exchange/models/reference_type.rb +0 -90
  111. data/lib/tql_otr_factoring_data_exchange/models/status.rb +0 -44
  112. data/lib/tql_otr_factoring_data_exchange/models/stop_input.rb +0 -121
  113. data/lib/tql_otr_factoring_data_exchange/models/stop_type.rb +0 -62
  114. data/lib/tql_otr_factoring_data_exchange/models/submit_invoice_request.rb +0 -326
  115. data/lib/tql_otr_factoring_data_exchange/models/weight_unit.rb +0 -36
  116. data/lib/tql_otr_factoring_data_exchange/utilities/date_time_helper.rb +0 -11
  117. data/lib/tql_otr_factoring_data_exchange/utilities/union_type_lookup.rb +0 -29
  118. 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
@@ -1,104 +1,90 @@
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
- # 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
- # Returns the configured authentication bearerAuth instance.
17
- def bearer_auth
18
- @auth_managers['bearerAuth']
19
- end
20
-
21
- # Access to invoices controller.
22
- # @return [InvoicesApi] Returns the controller instance.
23
- def invoices
24
- @invoices ||= InvoicesApi.new @global_configuration
25
- end
26
-
27
- # Access to documents controller.
28
- # @return [DocumentsApi] Returns the controller instance.
29
- def documents
30
- @documents ||= DocumentsApi.new @global_configuration
31
- end
32
-
33
- # Access to assignments controller.
34
- # @return [AssignmentsApi] Returns the controller instance.
35
- def assignments
36
- @assignments ||= AssignmentsApi.new @global_configuration
37
- end
38
-
39
- # Access to loads controller.
40
- # @return [LoadsApi] Returns the controller instance.
41
- def loads
42
- @loads ||= LoadsApi.new @global_configuration
43
- end
44
-
45
- # Access to oauth_authorization controller.
46
- # @return [OauthAuthorizationApi] Returns the controller instance.
47
- def oauth_authorization
48
- @oauth_authorization ||= OauthAuthorizationApi.new @global_configuration
49
- end
50
-
51
- def initialize(
52
- connection: nil, adapter: :net_http_persistent, timeout: 30,
53
- max_retries: 0, retry_interval: 1, backoff_factor: 2,
54
- retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
55
- retry_methods: %i[get put], http_callback: nil, proxy_settings: nil,
56
- logging_configuration: nil, environment: Environment::PRODUCTION,
57
- client_credentials_auth_credentials: nil, config: nil
58
- )
59
- @config = if config.nil?
60
- Configuration.new(
61
- connection: connection, adapter: adapter, timeout: timeout,
62
- max_retries: max_retries, retry_interval: retry_interval,
63
- backoff_factor: backoff_factor,
64
- retry_statuses: retry_statuses,
65
- retry_methods: retry_methods, http_callback: http_callback,
66
- proxy_settings: proxy_settings,
67
- logging_configuration: logging_configuration,
68
- environment: environment,
69
- client_credentials_auth_credentials: client_credentials_auth_credentials
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
-
82
- initialize_auth_managers(@global_configuration)
83
- @global_configuration = @global_configuration.auth_managers(@auth_managers)
84
- end
85
-
86
- # Initializes the auth managers hash used for authenticating API calls.
87
- # @param [GlobalConfiguration] global_config The global configuration of the SDK)
88
- def initialize_auth_managers(global_config)
89
- @auth_managers = {}
90
- http_client_config = global_config.client_configuration
91
- %w[bearerAuth].each { |auth| @auth_managers[auth] = nil }
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