apimatic-tql-sdk 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +148 -197
- data/bin/console +4 -4
- data/lib/freight_financials_webhook_ingestion_api/api_helper.rb +10 -0
- data/lib/freight_financials_webhook_ingestion_api/apis/assignments_api.rb +41 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/apis/base_api.rb +60 -60
- data/lib/freight_financials_webhook_ingestion_api/apis/documents_api.rb +73 -0
- data/lib/freight_financials_webhook_ingestion_api/apis/freight_audit_api.rb +54 -0
- data/lib/freight_financials_webhook_ingestion_api/apis/invoices_api.rb +107 -0
- data/lib/freight_financials_webhook_ingestion_api/apis/loads_api.rb +72 -0
- data/lib/freight_financials_webhook_ingestion_api/apis/rating_api.rb +45 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/client.rb +83 -97
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/configuration.rb +114 -126
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/exceptions/api_exception.rb +21 -21
- data/lib/{tql_otr_factoring_data_exchange/exceptions/problem_details_error_exception.rb → freight_financials_webhook_ingestion_api/exceptions/problem_details_exception.rb} +51 -41
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/http/api_response.rb +7 -7
- data/lib/freight_financials_webhook_ingestion_api/http/http_call_back.rb +10 -0
- data/lib/freight_financials_webhook_ingestion_api/http/http_method_enum.rb +10 -0
- data/lib/freight_financials_webhook_ingestion_api/http/http_request.rb +10 -0
- data/lib/freight_financials_webhook_ingestion_api/http/http_response.rb +10 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/http/proxy_settings.rb +6 -6
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/logging/configuration/api_logging_configuration.rb +6 -6
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/logging/sdk_logger.rb +6 -6
- data/lib/freight_financials_webhook_ingestion_api/models/address.rb +123 -0
- data/lib/freight_financials_webhook_ingestion_api/models/assignment_request.rb +94 -0
- data/lib/freight_financials_webhook_ingestion_api/models/assignment_response.rb +83 -0
- data/lib/{tql_otr_factoring_data_exchange/models/assignment_response.rb → freight_financials_webhook_ingestion_api/models/assignment_response_data.rb} +124 -126
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/models/base_model.rb +110 -110
- data/lib/{tql_otr_factoring_data_exchange/models/carrier1.rb → freight_financials_webhook_ingestion_api/models/carrier.rb} +96 -98
- data/lib/freight_financials_webhook_ingestion_api/models/charge.rb +104 -0
- data/lib/freight_financials_webhook_ingestion_api/models/charge_code.rb +81 -0
- data/lib/freight_financials_webhook_ingestion_api/models/factoring_company.rb +81 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/models/invoice.rb +204 -223
- data/lib/{tql_otr_factoring_data_exchange/models/document.rb → freight_financials_webhook_ingestion_api/models/invoice_document.rb} +72 -86
- data/lib/{tql_otr_factoring_data_exchange/models/invoice_exception.rb → freight_financials_webhook_ingestion_api/models/invoice_issue.rb} +122 -136
- data/lib/freight_financials_webhook_ingestion_api/models/invoice_status_response.rb +83 -0
- data/lib/{tql_otr_factoring_data_exchange/models/invoice_status_response.rb → freight_financials_webhook_ingestion_api/models/invoice_status_response_data.rb} +185 -193
- data/lib/freight_financials_webhook_ingestion_api/models/line_item.rb +131 -0
- data/lib/freight_financials_webhook_ingestion_api/models/load_response.rb +83 -0
- data/lib/{tql_otr_factoring_data_exchange/models/load_detail.rb → freight_financials_webhook_ingestion_api/models/load_response_data.rb} +141 -140
- data/lib/{tql_otr_factoring_data_exchange/models/load.rb → freight_financials_webhook_ingestion_api/models/load_slim.rb} +97 -110
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb +116 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_customer.rb +64 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb +177 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_request.rb +208 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_requested_charge.rb +64 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_response.rb +112 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb +107 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_vendor.rb +88 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_webhook_event_type.rb +56 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_webhook_request.rb +99 -0
- data/lib/freight_financials_webhook_ingestion_api/models/paged_response_of_invoice.rb +111 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/models/payment.rb +94 -108
- data/lib/freight_financials_webhook_ingestion_api/models/rating_charge_qualifier.rb +68 -0
- data/lib/freight_financials_webhook_ingestion_api/models/rating_response_format.rb +40 -0
- data/lib/freight_financials_webhook_ingestion_api/models/reference_number.rb +71 -0
- data/lib/{tql_otr_factoring_data_exchange/models/invoice_search_request.rb → freight_financials_webhook_ingestion_api/models/search_request.rb} +223 -242
- data/lib/freight_financials_webhook_ingestion_api/models/search_response.rb +83 -0
- data/lib/freight_financials_webhook_ingestion_api/models/stop.rb +81 -0
- data/lib/freight_financials_webhook_ingestion_api/models/submit_invoice_request.rb +228 -0
- data/lib/freight_financials_webhook_ingestion_api/models/submit_invoice_response.rb +83 -0
- data/lib/{tql_otr_factoring_data_exchange/models/submit_invoice_response.rb → freight_financials_webhook_ingestion_api/models/submit_invoice_response_data.rb} +105 -107
- data/lib/freight_financials_webhook_ingestion_api/models/upload_request.rb +128 -0
- data/lib/freight_financials_webhook_ingestion_api/models/upload_response.rb +83 -0
- data/lib/{tql_otr_factoring_data_exchange/models/document_upload_response.rb → freight_financials_webhook_ingestion_api/models/upload_response_data.rb} +117 -137
- data/lib/freight_financials_webhook_ingestion_api/utilities/date_time_helper.rb +11 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/utilities/file_wrapper.rb +17 -17
- data/lib/freight_financials_webhook_ingestion_api.rb +127 -0
- metadata +67 -74
- data/lib/tql_otr_factoring_data_exchange/api_helper.rb +0 -10
- data/lib/tql_otr_factoring_data_exchange/apis/assignments_api.rb +0 -45
- data/lib/tql_otr_factoring_data_exchange/apis/documents_api.rb +0 -82
- data/lib/tql_otr_factoring_data_exchange/apis/invoices_api.rb +0 -114
- data/lib/tql_otr_factoring_data_exchange/apis/loads_api.rb +0 -68
- data/lib/tql_otr_factoring_data_exchange/apis/oauth_authorization_api.rb +0 -44
- data/lib/tql_otr_factoring_data_exchange/exceptions/oauth_provider_exception.rb +0 -64
- data/lib/tql_otr_factoring_data_exchange/http/auth/oauth_2.rb +0 -156
- data/lib/tql_otr_factoring_data_exchange/http/http_call_back.rb +0 -10
- data/lib/tql_otr_factoring_data_exchange/http/http_method_enum.rb +0 -10
- data/lib/tql_otr_factoring_data_exchange/http/http_request.rb +0 -10
- data/lib/tql_otr_factoring_data_exchange/http/http_response.rb +0 -10
- data/lib/tql_otr_factoring_data_exchange/models/assignment_request.rb +0 -140
- data/lib/tql_otr_factoring_data_exchange/models/assignment_status.rb +0 -36
- data/lib/tql_otr_factoring_data_exchange/models/base64_document.rb +0 -118
- data/lib/tql_otr_factoring_data_exchange/models/base64_document_upload_request.rb +0 -107
- data/lib/tql_otr_factoring_data_exchange/models/carrier.rb +0 -98
- data/lib/tql_otr_factoring_data_exchange/models/carrier2.rb +0 -98
- data/lib/tql_otr_factoring_data_exchange/models/carrier_input.rb +0 -123
- data/lib/tql_otr_factoring_data_exchange/models/carrier_input1.rb +0 -123
- data/lib/tql_otr_factoring_data_exchange/models/charge_code.rb +0 -126
- data/lib/tql_otr_factoring_data_exchange/models/charge_code_origin.rb +0 -49
- data/lib/tql_otr_factoring_data_exchange/models/charge_input.rb +0 -146
- data/lib/tql_otr_factoring_data_exchange/models/document_type.rb +0 -288
- data/lib/tql_otr_factoring_data_exchange/models/document_upload_metadata.rb +0 -111
- data/lib/tql_otr_factoring_data_exchange/models/exception_severity.rb +0 -40
- data/lib/tql_otr_factoring_data_exchange/models/factoring_company_input.rb +0 -117
- data/lib/tql_otr_factoring_data_exchange/models/invoice_item_input.rb +0 -165
- data/lib/tql_otr_factoring_data_exchange/models/invoice_search_response.rb +0 -124
- data/lib/tql_otr_factoring_data_exchange/models/invoice_status.rb +0 -74
- data/lib/tql_otr_factoring_data_exchange/models/invoice_type.rb +0 -50
- data/lib/tql_otr_factoring_data_exchange/models/load_search_request.rb +0 -205
- data/lib/tql_otr_factoring_data_exchange/models/load_search_response.rb +0 -124
- data/lib/tql_otr_factoring_data_exchange/models/load_status.rb +0 -56
- data/lib/tql_otr_factoring_data_exchange/models/location.rb +0 -149
- data/lib/tql_otr_factoring_data_exchange/models/oauth_provider_error.rb +0 -62
- data/lib/tql_otr_factoring_data_exchange/models/oauth_scope.rb +0 -36
- data/lib/tql_otr_factoring_data_exchange/models/oauth_token.rb +0 -96
- data/lib/tql_otr_factoring_data_exchange/models/problem_details.rb +0 -96
- data/lib/tql_otr_factoring_data_exchange/models/reference_number_input.rb +0 -109
- data/lib/tql_otr_factoring_data_exchange/models/reference_type.rb +0 -90
- data/lib/tql_otr_factoring_data_exchange/models/status.rb +0 -44
- data/lib/tql_otr_factoring_data_exchange/models/stop_input.rb +0 -121
- data/lib/tql_otr_factoring_data_exchange/models/stop_type.rb +0 -62
- data/lib/tql_otr_factoring_data_exchange/models/submit_invoice_request.rb +0 -326
- data/lib/tql_otr_factoring_data_exchange/models/weight_unit.rb +0 -36
- data/lib/tql_otr_factoring_data_exchange/utilities/date_time_helper.rb +0 -11
- data/lib/tql_otr_factoring_data_exchange/utilities/union_type_lookup.rb +0 -29
- data/lib/tql_otr_factoring_data_exchange.rb +0 -107
|
@@ -1,140 +0,0 @@
|
|
|
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
|
-
# Request to assign or unassign a factoring company from a carrier. The
|
|
8
|
-
# carrier is identified by `carrier`. The `effectiveDate` indicates when the
|
|
9
|
-
# assignment or un-assignment took effect.
|
|
10
|
-
class AssignmentRequest < BaseModel
|
|
11
|
-
SKIP = Object.new
|
|
12
|
-
private_constant :SKIP
|
|
13
|
-
|
|
14
|
-
# Carrier information for the invoiced shipment. At least one of `mcNumber`
|
|
15
|
-
# or `dotNumber` must be provided.
|
|
16
|
-
# @return [Object]
|
|
17
|
-
attr_accessor :carrier
|
|
18
|
-
|
|
19
|
-
# Whether the factoring company is assigned to or unassigned from the
|
|
20
|
-
# carrier.
|
|
21
|
-
# @return [AssignmentStatus]
|
|
22
|
-
attr_accessor :status
|
|
23
|
-
|
|
24
|
-
# The date the assignment or un-assignment took effect ("as of" date). [ISO
|
|
25
|
-
# 8601](https://www.iso.org/iso-8601-date-and-time-format.html) date format
|
|
26
|
-
# (YYYY-MM-DD).
|
|
27
|
-
# @return [Date]
|
|
28
|
-
attr_accessor :effective_date
|
|
29
|
-
|
|
30
|
-
# An optional document to include with the request, encoded as a base64
|
|
31
|
-
# string.
|
|
32
|
-
# @return [Base64Document]
|
|
33
|
-
attr_accessor :document
|
|
34
|
-
|
|
35
|
-
# A mapping from model property names to API property names.
|
|
36
|
-
def self.names
|
|
37
|
-
@_hash = {} if @_hash.nil?
|
|
38
|
-
@_hash['carrier'] = 'carrier'
|
|
39
|
-
@_hash['status'] = 'status'
|
|
40
|
-
@_hash['effective_date'] = 'effectiveDate'
|
|
41
|
-
@_hash['document'] = 'document'
|
|
42
|
-
@_hash
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
# An array for optional fields
|
|
46
|
-
def self.optionals
|
|
47
|
-
%w[
|
|
48
|
-
document
|
|
49
|
-
]
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
# An array for nullable fields
|
|
53
|
-
def self.nullables
|
|
54
|
-
%w[
|
|
55
|
-
document
|
|
56
|
-
]
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
def initialize(carrier:, status:, effective_date:, document: SKIP,
|
|
60
|
-
additional_properties: nil)
|
|
61
|
-
# Add additional model properties to the instance
|
|
62
|
-
additional_properties = {} if additional_properties.nil?
|
|
63
|
-
|
|
64
|
-
@carrier = carrier
|
|
65
|
-
@status = status
|
|
66
|
-
@effective_date = effective_date
|
|
67
|
-
@document = document unless document == SKIP
|
|
68
|
-
@additional_properties = additional_properties
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
# Creates an instance of the object from a hash.
|
|
72
|
-
def self.from_hash(hash)
|
|
73
|
-
return nil unless hash
|
|
74
|
-
|
|
75
|
-
# Extract variables from the hash.
|
|
76
|
-
carrier = hash.key?('carrier') ? APIHelper.deserialize_union_type(
|
|
77
|
-
UnionTypeLookUp.get(:CarrierInput2), hash['carrier']
|
|
78
|
-
) : nil
|
|
79
|
-
status = hash.key?('status') ? hash['status'] : nil
|
|
80
|
-
effective_date = hash.key?('effectiveDate') ? hash['effectiveDate'] : nil
|
|
81
|
-
document = Base64Document.from_hash(hash['document']) if hash['document']
|
|
82
|
-
|
|
83
|
-
# Create a new hash for additional properties, removing known properties.
|
|
84
|
-
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
85
|
-
|
|
86
|
-
additional_properties = APIHelper.get_additional_properties(
|
|
87
|
-
new_hash, proc { |value| value }
|
|
88
|
-
)
|
|
89
|
-
|
|
90
|
-
# Create object from extracted values.
|
|
91
|
-
AssignmentRequest.new(carrier: carrier,
|
|
92
|
-
status: status,
|
|
93
|
-
effective_date: effective_date,
|
|
94
|
-
document: document,
|
|
95
|
-
additional_properties: additional_properties)
|
|
96
|
-
end
|
|
97
|
-
|
|
98
|
-
# Validates an instance of the object from a given value.
|
|
99
|
-
# @param [AssignmentRequest | Hash] The value against the validation is performed.
|
|
100
|
-
def self.validate(value)
|
|
101
|
-
if value.instance_of? self
|
|
102
|
-
return (
|
|
103
|
-
UnionTypeLookUp.get(:CarrierInput2)
|
|
104
|
-
.validate(value.carrier) and
|
|
105
|
-
APIHelper.valid_type?(value.status,
|
|
106
|
-
->(val) { AssignmentStatus.validate(val) }) and
|
|
107
|
-
APIHelper.valid_type?(value.effective_date,
|
|
108
|
-
->(val) { val.instance_of? String })
|
|
109
|
-
)
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
return false unless value.instance_of? Hash
|
|
113
|
-
|
|
114
|
-
(
|
|
115
|
-
UnionTypeLookUp.get(:CarrierInput2)
|
|
116
|
-
.validate(value['carrier']) and
|
|
117
|
-
APIHelper.valid_type?(value['status'],
|
|
118
|
-
->(val) { AssignmentStatus.validate(val) }) and
|
|
119
|
-
APIHelper.valid_type?(value['effectiveDate'],
|
|
120
|
-
->(val) { val.instance_of? String })
|
|
121
|
-
)
|
|
122
|
-
end
|
|
123
|
-
|
|
124
|
-
# Provides a human-readable string representation of the object.
|
|
125
|
-
def to_s
|
|
126
|
-
class_name = self.class.name.split('::').last
|
|
127
|
-
"<#{class_name} carrier: #{@carrier}, status: #{@status}, effective_date:"\
|
|
128
|
-
" #{@effective_date}, document: #{@document}, additional_properties:"\
|
|
129
|
-
" #{@additional_properties}>"
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
# Provides a debugging-friendly string with detailed object information.
|
|
133
|
-
def inspect
|
|
134
|
-
class_name = self.class.name.split('::').last
|
|
135
|
-
"<#{class_name} carrier: #{@carrier.inspect}, status: #{@status.inspect}, effective_date:"\
|
|
136
|
-
" #{@effective_date.inspect}, document: #{@document.inspect}, additional_properties:"\
|
|
137
|
-
" #{@additional_properties}>"
|
|
138
|
-
end
|
|
139
|
-
end
|
|
140
|
-
end
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
# Whether the factoring company is assigned to or unassigned from the carrier.
|
|
8
|
-
class AssignmentStatus
|
|
9
|
-
ASSIGNMENT_STATUS = [
|
|
10
|
-
# TODO: Write general description for ASSIGNED
|
|
11
|
-
ASSIGNED = 'Assigned'.freeze,
|
|
12
|
-
|
|
13
|
-
# TODO: Write general description for UNASSIGNED
|
|
14
|
-
UNASSIGNED = 'Unassigned'.freeze
|
|
15
|
-
].freeze
|
|
16
|
-
|
|
17
|
-
def self.validate(value)
|
|
18
|
-
return false if value.nil?
|
|
19
|
-
|
|
20
|
-
ASSIGNMENT_STATUS.include?(value)
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def self.from_value(value, default_value = ASSIGNED)
|
|
24
|
-
return default_value if value.nil?
|
|
25
|
-
|
|
26
|
-
str = value.to_s.strip
|
|
27
|
-
|
|
28
|
-
case str.downcase
|
|
29
|
-
when 'assigned' then ASSIGNED
|
|
30
|
-
when 'unassigned' then UNASSIGNED
|
|
31
|
-
else
|
|
32
|
-
default_value
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
@@ -1,118 +0,0 @@
|
|
|
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
|
-
# An optional document to include with the request, encoded as a base64
|
|
8
|
-
# string.
|
|
9
|
-
class Base64Document < BaseModel
|
|
10
|
-
SKIP = Object.new
|
|
11
|
-
private_constant :SKIP
|
|
12
|
-
|
|
13
|
-
# Base64-encoded document content.
|
|
14
|
-
# @return [String]
|
|
15
|
-
attr_accessor :content
|
|
16
|
-
|
|
17
|
-
# Original file name including extension.
|
|
18
|
-
# @return [String]
|
|
19
|
-
attr_accessor :file_name
|
|
20
|
-
|
|
21
|
-
# MIME type of the document.
|
|
22
|
-
# @return [String]
|
|
23
|
-
attr_accessor :content_type
|
|
24
|
-
|
|
25
|
-
# A mapping from model property names to API property names.
|
|
26
|
-
def self.names
|
|
27
|
-
@_hash = {} if @_hash.nil?
|
|
28
|
-
@_hash['content'] = 'content'
|
|
29
|
-
@_hash['file_name'] = 'fileName'
|
|
30
|
-
@_hash['content_type'] = 'contentType'
|
|
31
|
-
@_hash
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
# An array for optional fields
|
|
35
|
-
def self.optionals
|
|
36
|
-
[]
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
# An array for nullable fields
|
|
40
|
-
def self.nullables
|
|
41
|
-
[]
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
def initialize(content:, file_name:, content_type:,
|
|
45
|
-
additional_properties: nil)
|
|
46
|
-
# Add additional model properties to the instance
|
|
47
|
-
additional_properties = {} if additional_properties.nil?
|
|
48
|
-
|
|
49
|
-
@content = content
|
|
50
|
-
@file_name = file_name
|
|
51
|
-
@content_type = content_type
|
|
52
|
-
@additional_properties = additional_properties
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
# Creates an instance of the object from a hash.
|
|
56
|
-
def self.from_hash(hash)
|
|
57
|
-
return nil unless hash
|
|
58
|
-
|
|
59
|
-
# Extract variables from the hash.
|
|
60
|
-
content = hash.key?('content') ? hash['content'] : nil
|
|
61
|
-
file_name = hash.key?('fileName') ? hash['fileName'] : nil
|
|
62
|
-
content_type = hash.key?('contentType') ? hash['contentType'] : nil
|
|
63
|
-
|
|
64
|
-
# Create a new hash for additional properties, removing known properties.
|
|
65
|
-
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
66
|
-
|
|
67
|
-
additional_properties = APIHelper.get_additional_properties(
|
|
68
|
-
new_hash, proc { |value| value }
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
-
# Create object from extracted values.
|
|
72
|
-
Base64Document.new(content: content,
|
|
73
|
-
file_name: file_name,
|
|
74
|
-
content_type: content_type,
|
|
75
|
-
additional_properties: additional_properties)
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
# Validates an instance of the object from a given value.
|
|
79
|
-
# @param [Base64Document | Hash] The value against the validation is performed.
|
|
80
|
-
def self.validate(value)
|
|
81
|
-
if value.instance_of? self
|
|
82
|
-
return (
|
|
83
|
-
APIHelper.valid_type?(value.content,
|
|
84
|
-
->(val) { val.instance_of? String }) and
|
|
85
|
-
APIHelper.valid_type?(value.file_name,
|
|
86
|
-
->(val) { val.instance_of? String }) and
|
|
87
|
-
APIHelper.valid_type?(value.content_type,
|
|
88
|
-
->(val) { val.instance_of? String })
|
|
89
|
-
)
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
return false unless value.instance_of? Hash
|
|
93
|
-
|
|
94
|
-
(
|
|
95
|
-
APIHelper.valid_type?(value['content'],
|
|
96
|
-
->(val) { val.instance_of? String }) and
|
|
97
|
-
APIHelper.valid_type?(value['fileName'],
|
|
98
|
-
->(val) { val.instance_of? String }) and
|
|
99
|
-
APIHelper.valid_type?(value['contentType'],
|
|
100
|
-
->(val) { val.instance_of? String })
|
|
101
|
-
)
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
# Provides a human-readable string representation of the object.
|
|
105
|
-
def to_s
|
|
106
|
-
class_name = self.class.name.split('::').last
|
|
107
|
-
"<#{class_name} content: #{@content}, file_name: #{@file_name}, content_type:"\
|
|
108
|
-
" #{@content_type}, additional_properties: #{@additional_properties}>"
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
# Provides a debugging-friendly string with detailed object information.
|
|
112
|
-
def inspect
|
|
113
|
-
class_name = self.class.name.split('::').last
|
|
114
|
-
"<#{class_name} content: #{@content.inspect}, file_name: #{@file_name.inspect},"\
|
|
115
|
-
" content_type: #{@content_type.inspect}, additional_properties: #{@additional_properties}>"
|
|
116
|
-
end
|
|
117
|
-
end
|
|
118
|
-
end
|
|
@@ -1,107 +0,0 @@
|
|
|
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
|
-
# JSON request to upload a document as a base64-encoded string, linked to an
|
|
8
|
-
# invoice.
|
|
9
|
-
class Base64DocumentUploadRequest < BaseModel
|
|
10
|
-
SKIP = Object.new
|
|
11
|
-
private_constant :SKIP
|
|
12
|
-
|
|
13
|
-
# The factoring company's invoice number this document is associated with.
|
|
14
|
-
# @return [String]
|
|
15
|
-
attr_accessor :invoice_number
|
|
16
|
-
|
|
17
|
-
# Document type classification used for categorizing uploaded documents.
|
|
18
|
-
# @return [DocumentType]
|
|
19
|
-
attr_accessor :document_type
|
|
20
|
-
|
|
21
|
-
# An optional document to include with the request, encoded as a base64
|
|
22
|
-
# string.
|
|
23
|
-
# @return [Base64Document]
|
|
24
|
-
attr_accessor :document
|
|
25
|
-
|
|
26
|
-
# Arbitrary key-value metadata tags for this document.
|
|
27
|
-
# @return [Hash[String, String]]
|
|
28
|
-
attr_accessor :tags
|
|
29
|
-
|
|
30
|
-
# A mapping from model property names to API property names.
|
|
31
|
-
def self.names
|
|
32
|
-
@_hash = {} if @_hash.nil?
|
|
33
|
-
@_hash['invoice_number'] = 'invoiceNumber'
|
|
34
|
-
@_hash['document_type'] = 'documentType'
|
|
35
|
-
@_hash['document'] = 'document'
|
|
36
|
-
@_hash['tags'] = 'tags'
|
|
37
|
-
@_hash
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
# An array for optional fields
|
|
41
|
-
def self.optionals
|
|
42
|
-
%w[
|
|
43
|
-
tags
|
|
44
|
-
]
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
# An array for nullable fields
|
|
48
|
-
def self.nullables
|
|
49
|
-
%w[
|
|
50
|
-
document
|
|
51
|
-
tags
|
|
52
|
-
]
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
def initialize(invoice_number:, document_type:, document:, tags: SKIP,
|
|
56
|
-
additional_properties: nil)
|
|
57
|
-
# Add additional model properties to the instance
|
|
58
|
-
additional_properties = {} if additional_properties.nil?
|
|
59
|
-
|
|
60
|
-
@invoice_number = invoice_number
|
|
61
|
-
@document_type = document_type
|
|
62
|
-
@document = document
|
|
63
|
-
@tags = tags unless tags == SKIP
|
|
64
|
-
@additional_properties = additional_properties
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
# Creates an instance of the object from a hash.
|
|
68
|
-
def self.from_hash(hash)
|
|
69
|
-
return nil unless hash
|
|
70
|
-
|
|
71
|
-
# Extract variables from the hash.
|
|
72
|
-
invoice_number = hash.key?('invoiceNumber') ? hash['invoiceNumber'] : nil
|
|
73
|
-
document_type = hash.key?('documentType') ? hash['documentType'] : nil
|
|
74
|
-
document = Base64Document.from_hash(hash['document']) if hash['document']
|
|
75
|
-
tags = hash.key?('tags') ? hash['tags'] : SKIP
|
|
76
|
-
|
|
77
|
-
# Create a new hash for additional properties, removing known properties.
|
|
78
|
-
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
79
|
-
|
|
80
|
-
additional_properties = APIHelper.get_additional_properties(
|
|
81
|
-
new_hash, proc { |value| value }
|
|
82
|
-
)
|
|
83
|
-
|
|
84
|
-
# Create object from extracted values.
|
|
85
|
-
Base64DocumentUploadRequest.new(invoice_number: invoice_number,
|
|
86
|
-
document_type: document_type,
|
|
87
|
-
document: document,
|
|
88
|
-
tags: tags,
|
|
89
|
-
additional_properties: additional_properties)
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
# Provides a human-readable string representation of the object.
|
|
93
|
-
def to_s
|
|
94
|
-
class_name = self.class.name.split('::').last
|
|
95
|
-
"<#{class_name} invoice_number: #{@invoice_number}, document_type: #{@document_type},"\
|
|
96
|
-
" document: #{@document}, tags: #{@tags}, additional_properties: #{@additional_properties}>"
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
# Provides a debugging-friendly string with detailed object information.
|
|
100
|
-
def inspect
|
|
101
|
-
class_name = self.class.name.split('::').last
|
|
102
|
-
"<#{class_name} invoice_number: #{@invoice_number.inspect}, document_type:"\
|
|
103
|
-
" #{@document_type.inspect}, document: #{@document.inspect}, tags: #{@tags.inspect},"\
|
|
104
|
-
" additional_properties: #{@additional_properties}>"
|
|
105
|
-
end
|
|
106
|
-
end
|
|
107
|
-
end
|
|
@@ -1,98 +0,0 @@
|
|
|
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
|
-
# Carrier details associated with this invoice.
|
|
8
|
-
class Carrier < BaseModel
|
|
9
|
-
SKIP = Object.new
|
|
10
|
-
private_constant :SKIP
|
|
11
|
-
|
|
12
|
-
# Legal or DBA name of the carrier.
|
|
13
|
-
# @return [String]
|
|
14
|
-
attr_accessor :name
|
|
15
|
-
|
|
16
|
-
# USDOT number.
|
|
17
|
-
# @return [String]
|
|
18
|
-
attr_accessor :dot_number
|
|
19
|
-
|
|
20
|
-
# Motor Carrier (MC) number.
|
|
21
|
-
# @return [String]
|
|
22
|
-
attr_accessor :mc_number
|
|
23
|
-
|
|
24
|
-
# A mapping from model property names to API property names.
|
|
25
|
-
def self.names
|
|
26
|
-
@_hash = {} if @_hash.nil?
|
|
27
|
-
@_hash['name'] = 'name'
|
|
28
|
-
@_hash['dot_number'] = 'dotNumber'
|
|
29
|
-
@_hash['mc_number'] = 'mcNumber'
|
|
30
|
-
@_hash
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# An array for optional fields
|
|
34
|
-
def self.optionals
|
|
35
|
-
%w[
|
|
36
|
-
name
|
|
37
|
-
dot_number
|
|
38
|
-
mc_number
|
|
39
|
-
]
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
# An array for nullable fields
|
|
43
|
-
def self.nullables
|
|
44
|
-
%w[
|
|
45
|
-
dot_number
|
|
46
|
-
mc_number
|
|
47
|
-
]
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
def initialize(name: SKIP, dot_number: SKIP, mc_number: SKIP,
|
|
51
|
-
additional_properties: nil)
|
|
52
|
-
# Add additional model properties to the instance
|
|
53
|
-
additional_properties = {} if additional_properties.nil?
|
|
54
|
-
|
|
55
|
-
@name = name unless name == SKIP
|
|
56
|
-
@dot_number = dot_number unless dot_number == SKIP
|
|
57
|
-
@mc_number = mc_number unless mc_number == SKIP
|
|
58
|
-
@additional_properties = additional_properties
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
# Creates an instance of the object from a hash.
|
|
62
|
-
def self.from_hash(hash)
|
|
63
|
-
return nil unless hash
|
|
64
|
-
|
|
65
|
-
# Extract variables from the hash.
|
|
66
|
-
name = hash.key?('name') ? hash['name'] : SKIP
|
|
67
|
-
dot_number = hash.key?('dotNumber') ? hash['dotNumber'] : SKIP
|
|
68
|
-
mc_number = hash.key?('mcNumber') ? hash['mcNumber'] : SKIP
|
|
69
|
-
|
|
70
|
-
# Create a new hash for additional properties, removing known properties.
|
|
71
|
-
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
72
|
-
|
|
73
|
-
additional_properties = APIHelper.get_additional_properties(
|
|
74
|
-
new_hash, proc { |value| value }
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
# Create object from extracted values.
|
|
78
|
-
Carrier.new(name: name,
|
|
79
|
-
dot_number: dot_number,
|
|
80
|
-
mc_number: mc_number,
|
|
81
|
-
additional_properties: additional_properties)
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# Provides a human-readable string representation of the object.
|
|
85
|
-
def to_s
|
|
86
|
-
class_name = self.class.name.split('::').last
|
|
87
|
-
"<#{class_name} name: #{@name}, dot_number: #{@dot_number}, mc_number: #{@mc_number},"\
|
|
88
|
-
" additional_properties: #{@additional_properties}>"
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
# Provides a debugging-friendly string with detailed object information.
|
|
92
|
-
def inspect
|
|
93
|
-
class_name = self.class.name.split('::').last
|
|
94
|
-
"<#{class_name} name: #{@name.inspect}, dot_number: #{@dot_number.inspect}, mc_number:"\
|
|
95
|
-
" #{@mc_number.inspect}, additional_properties: #{@additional_properties}>"
|
|
96
|
-
end
|
|
97
|
-
end
|
|
98
|
-
end
|
|
@@ -1,98 +0,0 @@
|
|
|
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
|
-
# Carrier assigned to this load.
|
|
8
|
-
class Carrier2 < BaseModel
|
|
9
|
-
SKIP = Object.new
|
|
10
|
-
private_constant :SKIP
|
|
11
|
-
|
|
12
|
-
# Legal or DBA name of the carrier.
|
|
13
|
-
# @return [String]
|
|
14
|
-
attr_accessor :carrier_name
|
|
15
|
-
|
|
16
|
-
# Motor Carrier (MC) number.
|
|
17
|
-
# @return [String]
|
|
18
|
-
attr_accessor :mc_number
|
|
19
|
-
|
|
20
|
-
# USDOT number.
|
|
21
|
-
# @return [String]
|
|
22
|
-
attr_accessor :dot_number
|
|
23
|
-
|
|
24
|
-
# A mapping from model property names to API property names.
|
|
25
|
-
def self.names
|
|
26
|
-
@_hash = {} if @_hash.nil?
|
|
27
|
-
@_hash['carrier_name'] = 'carrierName'
|
|
28
|
-
@_hash['mc_number'] = 'mcNumber'
|
|
29
|
-
@_hash['dot_number'] = 'dotNumber'
|
|
30
|
-
@_hash
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# An array for optional fields
|
|
34
|
-
def self.optionals
|
|
35
|
-
%w[
|
|
36
|
-
carrier_name
|
|
37
|
-
mc_number
|
|
38
|
-
dot_number
|
|
39
|
-
]
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
# An array for nullable fields
|
|
43
|
-
def self.nullables
|
|
44
|
-
%w[
|
|
45
|
-
mc_number
|
|
46
|
-
dot_number
|
|
47
|
-
]
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
def initialize(carrier_name: SKIP, mc_number: SKIP, dot_number: SKIP,
|
|
51
|
-
additional_properties: nil)
|
|
52
|
-
# Add additional model properties to the instance
|
|
53
|
-
additional_properties = {} if additional_properties.nil?
|
|
54
|
-
|
|
55
|
-
@carrier_name = carrier_name unless carrier_name == SKIP
|
|
56
|
-
@mc_number = mc_number unless mc_number == SKIP
|
|
57
|
-
@dot_number = dot_number unless dot_number == SKIP
|
|
58
|
-
@additional_properties = additional_properties
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
# Creates an instance of the object from a hash.
|
|
62
|
-
def self.from_hash(hash)
|
|
63
|
-
return nil unless hash
|
|
64
|
-
|
|
65
|
-
# Extract variables from the hash.
|
|
66
|
-
carrier_name = hash.key?('carrierName') ? hash['carrierName'] : SKIP
|
|
67
|
-
mc_number = hash.key?('mcNumber') ? hash['mcNumber'] : SKIP
|
|
68
|
-
dot_number = hash.key?('dotNumber') ? hash['dotNumber'] : SKIP
|
|
69
|
-
|
|
70
|
-
# Create a new hash for additional properties, removing known properties.
|
|
71
|
-
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
72
|
-
|
|
73
|
-
additional_properties = APIHelper.get_additional_properties(
|
|
74
|
-
new_hash, proc { |value| value }
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
# Create object from extracted values.
|
|
78
|
-
Carrier2.new(carrier_name: carrier_name,
|
|
79
|
-
mc_number: mc_number,
|
|
80
|
-
dot_number: dot_number,
|
|
81
|
-
additional_properties: additional_properties)
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# Provides a human-readable string representation of the object.
|
|
85
|
-
def to_s
|
|
86
|
-
class_name = self.class.name.split('::').last
|
|
87
|
-
"<#{class_name} carrier_name: #{@carrier_name}, mc_number: #{@mc_number}, dot_number:"\
|
|
88
|
-
" #{@dot_number}, additional_properties: #{@additional_properties}>"
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
# Provides a debugging-friendly string with detailed object information.
|
|
92
|
-
def inspect
|
|
93
|
-
class_name = self.class.name.split('::').last
|
|
94
|
-
"<#{class_name} carrier_name: #{@carrier_name.inspect}, mc_number: #{@mc_number.inspect},"\
|
|
95
|
-
" dot_number: #{@dot_number.inspect}, additional_properties: #{@additional_properties}>"
|
|
96
|
-
end
|
|
97
|
-
end
|
|
98
|
-
end
|