apimatic-tql-sdk 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +148 -197
- data/bin/console +4 -4
- data/lib/freight_financials_webhook_ingestion_api/api_helper.rb +10 -0
- data/lib/freight_financials_webhook_ingestion_api/apis/assignments_api.rb +41 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/apis/base_api.rb +60 -60
- data/lib/freight_financials_webhook_ingestion_api/apis/documents_api.rb +73 -0
- data/lib/freight_financials_webhook_ingestion_api/apis/freight_audit_api.rb +54 -0
- data/lib/freight_financials_webhook_ingestion_api/apis/invoices_api.rb +107 -0
- data/lib/freight_financials_webhook_ingestion_api/apis/loads_api.rb +72 -0
- data/lib/freight_financials_webhook_ingestion_api/apis/rating_api.rb +45 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/client.rb +83 -97
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/configuration.rb +114 -126
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/exceptions/api_exception.rb +21 -21
- data/lib/{tql_otr_factoring_data_exchange/exceptions/problem_details_error_exception.rb → freight_financials_webhook_ingestion_api/exceptions/problem_details_exception.rb} +51 -41
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/http/api_response.rb +7 -7
- data/lib/freight_financials_webhook_ingestion_api/http/http_call_back.rb +10 -0
- data/lib/freight_financials_webhook_ingestion_api/http/http_method_enum.rb +10 -0
- data/lib/freight_financials_webhook_ingestion_api/http/http_request.rb +10 -0
- data/lib/freight_financials_webhook_ingestion_api/http/http_response.rb +10 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/http/proxy_settings.rb +6 -6
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/logging/configuration/api_logging_configuration.rb +6 -6
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/logging/sdk_logger.rb +6 -6
- data/lib/freight_financials_webhook_ingestion_api/models/address.rb +123 -0
- data/lib/freight_financials_webhook_ingestion_api/models/assignment_request.rb +94 -0
- data/lib/freight_financials_webhook_ingestion_api/models/assignment_response.rb +83 -0
- data/lib/{tql_otr_factoring_data_exchange/models/assignment_response.rb → freight_financials_webhook_ingestion_api/models/assignment_response_data.rb} +124 -126
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/models/base_model.rb +110 -110
- data/lib/{tql_otr_factoring_data_exchange/models/carrier1.rb → freight_financials_webhook_ingestion_api/models/carrier.rb} +96 -98
- data/lib/freight_financials_webhook_ingestion_api/models/charge.rb +104 -0
- data/lib/freight_financials_webhook_ingestion_api/models/charge_code.rb +81 -0
- data/lib/freight_financials_webhook_ingestion_api/models/factoring_company.rb +81 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/models/invoice.rb +204 -223
- data/lib/{tql_otr_factoring_data_exchange/models/document.rb → freight_financials_webhook_ingestion_api/models/invoice_document.rb} +72 -86
- data/lib/{tql_otr_factoring_data_exchange/models/invoice_exception.rb → freight_financials_webhook_ingestion_api/models/invoice_issue.rb} +122 -136
- data/lib/freight_financials_webhook_ingestion_api/models/invoice_status_response.rb +83 -0
- data/lib/{tql_otr_factoring_data_exchange/models/invoice_status_response.rb → freight_financials_webhook_ingestion_api/models/invoice_status_response_data.rb} +185 -193
- data/lib/freight_financials_webhook_ingestion_api/models/line_item.rb +131 -0
- data/lib/freight_financials_webhook_ingestion_api/models/load_response.rb +83 -0
- data/lib/{tql_otr_factoring_data_exchange/models/load_detail.rb → freight_financials_webhook_ingestion_api/models/load_response_data.rb} +141 -140
- data/lib/{tql_otr_factoring_data_exchange/models/load.rb → freight_financials_webhook_ingestion_api/models/load_slim.rb} +97 -110
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb +116 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_customer.rb +64 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb +177 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_request.rb +208 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_requested_charge.rb +64 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_response.rb +112 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb +107 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_vendor.rb +88 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_webhook_event_type.rb +56 -0
- data/lib/freight_financials_webhook_ingestion_api/models/navix_webhook_request.rb +99 -0
- data/lib/freight_financials_webhook_ingestion_api/models/paged_response_of_invoice.rb +111 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/models/payment.rb +94 -108
- data/lib/freight_financials_webhook_ingestion_api/models/rating_charge_qualifier.rb +68 -0
- data/lib/freight_financials_webhook_ingestion_api/models/rating_response_format.rb +40 -0
- data/lib/freight_financials_webhook_ingestion_api/models/reference_number.rb +71 -0
- data/lib/{tql_otr_factoring_data_exchange/models/invoice_search_request.rb → freight_financials_webhook_ingestion_api/models/search_request.rb} +223 -242
- data/lib/freight_financials_webhook_ingestion_api/models/search_response.rb +83 -0
- data/lib/freight_financials_webhook_ingestion_api/models/stop.rb +81 -0
- data/lib/freight_financials_webhook_ingestion_api/models/submit_invoice_request.rb +228 -0
- data/lib/freight_financials_webhook_ingestion_api/models/submit_invoice_response.rb +83 -0
- data/lib/{tql_otr_factoring_data_exchange/models/submit_invoice_response.rb → freight_financials_webhook_ingestion_api/models/submit_invoice_response_data.rb} +105 -107
- data/lib/freight_financials_webhook_ingestion_api/models/upload_request.rb +128 -0
- data/lib/freight_financials_webhook_ingestion_api/models/upload_response.rb +83 -0
- data/lib/{tql_otr_factoring_data_exchange/models/document_upload_response.rb → freight_financials_webhook_ingestion_api/models/upload_response_data.rb} +117 -137
- data/lib/freight_financials_webhook_ingestion_api/utilities/date_time_helper.rb +11 -0
- data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/utilities/file_wrapper.rb +17 -17
- data/lib/freight_financials_webhook_ingestion_api.rb +127 -0
- metadata +67 -74
- data/lib/tql_otr_factoring_data_exchange/api_helper.rb +0 -10
- data/lib/tql_otr_factoring_data_exchange/apis/assignments_api.rb +0 -45
- data/lib/tql_otr_factoring_data_exchange/apis/documents_api.rb +0 -82
- data/lib/tql_otr_factoring_data_exchange/apis/invoices_api.rb +0 -114
- data/lib/tql_otr_factoring_data_exchange/apis/loads_api.rb +0 -68
- data/lib/tql_otr_factoring_data_exchange/apis/oauth_authorization_api.rb +0 -44
- data/lib/tql_otr_factoring_data_exchange/exceptions/oauth_provider_exception.rb +0 -64
- data/lib/tql_otr_factoring_data_exchange/http/auth/oauth_2.rb +0 -156
- data/lib/tql_otr_factoring_data_exchange/http/http_call_back.rb +0 -10
- data/lib/tql_otr_factoring_data_exchange/http/http_method_enum.rb +0 -10
- data/lib/tql_otr_factoring_data_exchange/http/http_request.rb +0 -10
- data/lib/tql_otr_factoring_data_exchange/http/http_response.rb +0 -10
- data/lib/tql_otr_factoring_data_exchange/models/assignment_request.rb +0 -140
- data/lib/tql_otr_factoring_data_exchange/models/assignment_status.rb +0 -36
- data/lib/tql_otr_factoring_data_exchange/models/base64_document.rb +0 -118
- data/lib/tql_otr_factoring_data_exchange/models/base64_document_upload_request.rb +0 -107
- data/lib/tql_otr_factoring_data_exchange/models/carrier.rb +0 -98
- data/lib/tql_otr_factoring_data_exchange/models/carrier2.rb +0 -98
- data/lib/tql_otr_factoring_data_exchange/models/carrier_input.rb +0 -123
- data/lib/tql_otr_factoring_data_exchange/models/carrier_input1.rb +0 -123
- data/lib/tql_otr_factoring_data_exchange/models/charge_code.rb +0 -126
- data/lib/tql_otr_factoring_data_exchange/models/charge_code_origin.rb +0 -49
- data/lib/tql_otr_factoring_data_exchange/models/charge_input.rb +0 -146
- data/lib/tql_otr_factoring_data_exchange/models/document_type.rb +0 -288
- data/lib/tql_otr_factoring_data_exchange/models/document_upload_metadata.rb +0 -111
- data/lib/tql_otr_factoring_data_exchange/models/exception_severity.rb +0 -40
- data/lib/tql_otr_factoring_data_exchange/models/factoring_company_input.rb +0 -117
- data/lib/tql_otr_factoring_data_exchange/models/invoice_item_input.rb +0 -165
- data/lib/tql_otr_factoring_data_exchange/models/invoice_search_response.rb +0 -124
- data/lib/tql_otr_factoring_data_exchange/models/invoice_status.rb +0 -74
- data/lib/tql_otr_factoring_data_exchange/models/invoice_type.rb +0 -50
- data/lib/tql_otr_factoring_data_exchange/models/load_search_request.rb +0 -205
- data/lib/tql_otr_factoring_data_exchange/models/load_search_response.rb +0 -124
- data/lib/tql_otr_factoring_data_exchange/models/load_status.rb +0 -56
- data/lib/tql_otr_factoring_data_exchange/models/location.rb +0 -149
- data/lib/tql_otr_factoring_data_exchange/models/oauth_provider_error.rb +0 -62
- data/lib/tql_otr_factoring_data_exchange/models/oauth_scope.rb +0 -36
- data/lib/tql_otr_factoring_data_exchange/models/oauth_token.rb +0 -96
- data/lib/tql_otr_factoring_data_exchange/models/problem_details.rb +0 -96
- data/lib/tql_otr_factoring_data_exchange/models/reference_number_input.rb +0 -109
- data/lib/tql_otr_factoring_data_exchange/models/reference_type.rb +0 -90
- data/lib/tql_otr_factoring_data_exchange/models/status.rb +0 -44
- data/lib/tql_otr_factoring_data_exchange/models/stop_input.rb +0 -121
- data/lib/tql_otr_factoring_data_exchange/models/stop_type.rb +0 -62
- data/lib/tql_otr_factoring_data_exchange/models/submit_invoice_request.rb +0 -326
- data/lib/tql_otr_factoring_data_exchange/models/weight_unit.rb +0 -36
- data/lib/tql_otr_factoring_data_exchange/utilities/date_time_helper.rb +0 -11
- data/lib/tql_otr_factoring_data_exchange/utilities/union_type_lookup.rb +0 -29
- data/lib/tql_otr_factoring_data_exchange.rb +0 -107
|
@@ -0,0 +1,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
|
+
# NavixRateStop Model.
|
|
8
|
+
class NavixRateStop < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :type
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :city
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :state_code
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :zip
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for this method
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :country_code
|
|
31
|
+
|
|
32
|
+
# A mapping from model property names to API property names.
|
|
33
|
+
def self.names
|
|
34
|
+
@_hash = {} if @_hash.nil?
|
|
35
|
+
@_hash['type'] = 'type'
|
|
36
|
+
@_hash['city'] = 'city'
|
|
37
|
+
@_hash['state_code'] = 'stateCode'
|
|
38
|
+
@_hash['zip'] = 'zip'
|
|
39
|
+
@_hash['country_code'] = 'countryCode'
|
|
40
|
+
@_hash
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# An array for optional fields
|
|
44
|
+
def self.optionals
|
|
45
|
+
%w[
|
|
46
|
+
type
|
|
47
|
+
city
|
|
48
|
+
state_code
|
|
49
|
+
zip
|
|
50
|
+
country_code
|
|
51
|
+
]
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# An array for nullable fields
|
|
55
|
+
def self.nullables
|
|
56
|
+
%w[
|
|
57
|
+
type
|
|
58
|
+
city
|
|
59
|
+
state_code
|
|
60
|
+
zip
|
|
61
|
+
country_code
|
|
62
|
+
]
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def initialize(type: SKIP, city: SKIP, state_code: SKIP, zip: SKIP,
|
|
66
|
+
country_code: SKIP)
|
|
67
|
+
@type = type unless type == SKIP
|
|
68
|
+
@city = city unless city == SKIP
|
|
69
|
+
@state_code = state_code unless state_code == SKIP
|
|
70
|
+
@zip = zip unless zip == SKIP
|
|
71
|
+
@country_code = country_code unless country_code == SKIP
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Creates an instance of the object from a hash.
|
|
75
|
+
def self.from_hash(hash)
|
|
76
|
+
return nil unless hash
|
|
77
|
+
|
|
78
|
+
# Extract variables from the hash.
|
|
79
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
80
|
+
city = hash.key?('city') ? hash['city'] : SKIP
|
|
81
|
+
state_code = hash.key?('stateCode') ? hash['stateCode'] : SKIP
|
|
82
|
+
zip = hash.key?('zip') ? hash['zip'] : SKIP
|
|
83
|
+
country_code = hash.key?('countryCode') ? hash['countryCode'] : SKIP
|
|
84
|
+
|
|
85
|
+
# Create object from extracted values.
|
|
86
|
+
NavixRateStop.new(type: type,
|
|
87
|
+
city: city,
|
|
88
|
+
state_code: state_code,
|
|
89
|
+
zip: zip,
|
|
90
|
+
country_code: country_code)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Provides a human-readable string representation of the object.
|
|
94
|
+
def to_s
|
|
95
|
+
class_name = self.class.name.split('::').last
|
|
96
|
+
"<#{class_name} type: #{@type}, city: #{@city}, state_code: #{@state_code}, zip: #{@zip},"\
|
|
97
|
+
" country_code: #{@country_code}>"
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
101
|
+
def inspect
|
|
102
|
+
class_name = self.class.name.split('::').last
|
|
103
|
+
"<#{class_name} type: #{@type.inspect}, city: #{@city.inspect}, state_code:"\
|
|
104
|
+
" #{@state_code.inspect}, zip: #{@zip.inspect}, country_code: #{@country_code.inspect}>"
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
# NavixRateVendor Model.
|
|
8
|
+
class NavixRateVendor < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :external_id
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :scac
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['external_id'] = 'externalId'
|
|
24
|
+
@_hash['scac'] = 'SCAC'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
external_id
|
|
32
|
+
scac
|
|
33
|
+
]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
%w[
|
|
39
|
+
external_id
|
|
40
|
+
scac
|
|
41
|
+
]
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def initialize(external_id: SKIP, scac: SKIP, additional_properties: nil)
|
|
45
|
+
# Add additional model properties to the instance
|
|
46
|
+
additional_properties = {} if additional_properties.nil?
|
|
47
|
+
|
|
48
|
+
@external_id = external_id unless external_id == SKIP
|
|
49
|
+
@scac = scac unless scac == SKIP
|
|
50
|
+
@additional_properties = additional_properties
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Creates an instance of the object from a hash.
|
|
54
|
+
def self.from_hash(hash)
|
|
55
|
+
return nil unless hash
|
|
56
|
+
|
|
57
|
+
# Extract variables from the hash.
|
|
58
|
+
external_id = hash.key?('externalId') ? hash['externalId'] : SKIP
|
|
59
|
+
scac = hash.key?('SCAC') ? hash['SCAC'] : SKIP
|
|
60
|
+
|
|
61
|
+
# Create a new hash for additional properties, removing known properties.
|
|
62
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
63
|
+
|
|
64
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
65
|
+
new_hash, proc { |value| value }
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
# Create object from extracted values.
|
|
69
|
+
NavixRateVendor.new(external_id: external_id,
|
|
70
|
+
scac: scac,
|
|
71
|
+
additional_properties: additional_properties)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Provides a human-readable string representation of the object.
|
|
75
|
+
def to_s
|
|
76
|
+
class_name = self.class.name.split('::').last
|
|
77
|
+
"<#{class_name} external_id: #{@external_id}, scac: #{@scac}, additional_properties:"\
|
|
78
|
+
" #{@additional_properties}>"
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
82
|
+
def inspect
|
|
83
|
+
class_name = self.class.name.split('::').last
|
|
84
|
+
"<#{class_name} external_id: #{@external_id.inspect}, scac: #{@scac.inspect},"\
|
|
85
|
+
" additional_properties: #{@additional_properties}>"
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
# NavixWebhookEventType.
|
|
8
|
+
class NavixWebhookEventType
|
|
9
|
+
NAVIX_WEBHOOK_EVENT_TYPE = [
|
|
10
|
+
# TODO: Write general description for INVOICE_CREATED
|
|
11
|
+
INVOICE_CREATED = 'INVOICE_CREATED'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for INVOICE_APPROVED
|
|
14
|
+
INVOICE_APPROVED = 'INVOICE_APPROVED'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for DISPUTE_CREATED
|
|
17
|
+
DISPUTE_CREATED = 'DISPUTE_CREATED'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for DISPUTE_UPDATED
|
|
20
|
+
DISPUTE_UPDATED = 'DISPUTE_UPDATED'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for DISPUTE_COMMUNICATION_CREATED
|
|
23
|
+
DISPUTE_COMMUNICATION_CREATED = 'DISPUTE_COMMUNICATION_CREATED'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for ORDER_APPROVED
|
|
26
|
+
ORDER_APPROVED = 'ORDER_APPROVED'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for DOCUMENT_APPROVED
|
|
29
|
+
DOCUMENT_APPROVED = 'DOCUMENT_APPROVED'.freeze
|
|
30
|
+
].freeze
|
|
31
|
+
|
|
32
|
+
def self.validate(value)
|
|
33
|
+
return false if value.nil?
|
|
34
|
+
|
|
35
|
+
NAVIX_WEBHOOK_EVENT_TYPE.include?(value)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def self.from_value(value, default_value = INVOICE_CREATED)
|
|
39
|
+
return default_value if value.nil?
|
|
40
|
+
|
|
41
|
+
str = value.to_s.strip
|
|
42
|
+
|
|
43
|
+
case str.downcase
|
|
44
|
+
when 'invoice_created' then INVOICE_CREATED
|
|
45
|
+
when 'invoice_approved' then INVOICE_APPROVED
|
|
46
|
+
when 'dispute_created' then DISPUTE_CREATED
|
|
47
|
+
when 'dispute_updated' then DISPUTE_UPDATED
|
|
48
|
+
when 'dispute_communication_created' then DISPUTE_COMMUNICATION_CREATED
|
|
49
|
+
when 'order_approved' then ORDER_APPROVED
|
|
50
|
+
when 'document_approved' then DOCUMENT_APPROVED
|
|
51
|
+
else
|
|
52
|
+
default_value
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# freight_financials_webhook_ingestion_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically
|
|
4
|
+
# generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module FreightFinancialsWebhookIngestionApi
|
|
8
|
+
# NavixWebhookRequest Model.
|
|
9
|
+
class NavixWebhookRequest < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for this method
|
|
14
|
+
# @return [UUID | String]
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for this method
|
|
18
|
+
# @return [NavixWebhookEventType]
|
|
19
|
+
attr_accessor :type
|
|
20
|
+
|
|
21
|
+
# TODO: Write general description for this method
|
|
22
|
+
# @return [DateTime]
|
|
23
|
+
attr_accessor :time
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for this method
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :data
|
|
28
|
+
|
|
29
|
+
# A mapping from model property names to API property names.
|
|
30
|
+
def self.names
|
|
31
|
+
@_hash = {} if @_hash.nil?
|
|
32
|
+
@_hash['id'] = 'id'
|
|
33
|
+
@_hash['type'] = 'type'
|
|
34
|
+
@_hash['time'] = 'time'
|
|
35
|
+
@_hash['data'] = 'data'
|
|
36
|
+
@_hash
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# An array for optional fields
|
|
40
|
+
def self.optionals
|
|
41
|
+
%w[
|
|
42
|
+
id
|
|
43
|
+
type
|
|
44
|
+
time
|
|
45
|
+
data
|
|
46
|
+
]
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for nullable fields
|
|
50
|
+
def self.nullables
|
|
51
|
+
[]
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def initialize(id: SKIP, type: SKIP, time: SKIP, data: SKIP)
|
|
55
|
+
@id = id unless id == SKIP
|
|
56
|
+
@type = type unless type == SKIP
|
|
57
|
+
@time = time unless time == SKIP
|
|
58
|
+
@data = data unless data == SKIP
|
|
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
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
67
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
68
|
+
time = if hash.key?('time')
|
|
69
|
+
(DateTimeHelper.from_rfc3339(hash['time']) if hash['time'])
|
|
70
|
+
else
|
|
71
|
+
SKIP
|
|
72
|
+
end
|
|
73
|
+
data = hash.key?('data') ? hash['data'] : SKIP
|
|
74
|
+
|
|
75
|
+
# Create object from extracted values.
|
|
76
|
+
NavixWebhookRequest.new(id: id,
|
|
77
|
+
type: type,
|
|
78
|
+
time: time,
|
|
79
|
+
data: data)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def to_custom_time
|
|
83
|
+
DateTimeHelper.to_rfc3339(time)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Provides a human-readable string representation of the object.
|
|
87
|
+
def to_s
|
|
88
|
+
class_name = self.class.name.split('::').last
|
|
89
|
+
"<#{class_name} id: #{@id}, type: #{@type}, time: #{@time}, data: #{@data}>"
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
93
|
+
def inspect
|
|
94
|
+
class_name = self.class.name.split('::').last
|
|
95
|
+
"<#{class_name} id: #{@id.inspect}, type: #{@type.inspect}, time: #{@time.inspect}, data:"\
|
|
96
|
+
" #{@data.inspect}>"
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
@@ -0,0 +1,111 @@
|
|
|
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
|
+
# PagedResponseOfInvoice Model.
|
|
8
|
+
class PagedResponseOfInvoice < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
attr_accessor :page_number
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [Integer]
|
|
18
|
+
attr_accessor :page_size
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [Integer]
|
|
22
|
+
attr_accessor :total_count
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [Integer]
|
|
26
|
+
attr_accessor :total_pages
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for this method
|
|
29
|
+
# @return [Array[Invoice]]
|
|
30
|
+
attr_accessor :results
|
|
31
|
+
|
|
32
|
+
# A mapping from model property names to API property names.
|
|
33
|
+
def self.names
|
|
34
|
+
@_hash = {} if @_hash.nil?
|
|
35
|
+
@_hash['page_number'] = 'pageNumber'
|
|
36
|
+
@_hash['page_size'] = 'pageSize'
|
|
37
|
+
@_hash['total_count'] = 'totalCount'
|
|
38
|
+
@_hash['total_pages'] = 'totalPages'
|
|
39
|
+
@_hash['results'] = 'results'
|
|
40
|
+
@_hash
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# An array for optional fields
|
|
44
|
+
def self.optionals
|
|
45
|
+
%w[
|
|
46
|
+
page_number
|
|
47
|
+
page_size
|
|
48
|
+
total_count
|
|
49
|
+
total_pages
|
|
50
|
+
results
|
|
51
|
+
]
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# An array for nullable fields
|
|
55
|
+
def self.nullables
|
|
56
|
+
[]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def initialize(page_number: SKIP, page_size: SKIP, total_count: SKIP,
|
|
60
|
+
total_pages: SKIP, results: SKIP)
|
|
61
|
+
@page_number = page_number unless page_number == SKIP
|
|
62
|
+
@page_size = page_size unless page_size == SKIP
|
|
63
|
+
@total_count = total_count unless total_count == SKIP
|
|
64
|
+
@total_pages = total_pages unless total_pages == SKIP
|
|
65
|
+
@results = results unless results == SKIP
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Creates an instance of the object from a hash.
|
|
69
|
+
def self.from_hash(hash)
|
|
70
|
+
return nil unless hash
|
|
71
|
+
|
|
72
|
+
# Extract variables from the hash.
|
|
73
|
+
page_number = hash.key?('pageNumber') ? hash['pageNumber'] : SKIP
|
|
74
|
+
page_size = hash.key?('pageSize') ? hash['pageSize'] : SKIP
|
|
75
|
+
total_count = hash.key?('totalCount') ? hash['totalCount'] : SKIP
|
|
76
|
+
total_pages = hash.key?('totalPages') ? hash['totalPages'] : SKIP
|
|
77
|
+
# Parameter is an array, so we need to iterate through it
|
|
78
|
+
results = nil
|
|
79
|
+
unless hash['results'].nil?
|
|
80
|
+
results = []
|
|
81
|
+
hash['results'].each do |structure|
|
|
82
|
+
results << (Invoice.from_hash(structure) if structure)
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
results = SKIP unless hash.key?('results')
|
|
87
|
+
|
|
88
|
+
# Create object from extracted values.
|
|
89
|
+
PagedResponseOfInvoice.new(page_number: page_number,
|
|
90
|
+
page_size: page_size,
|
|
91
|
+
total_count: total_count,
|
|
92
|
+
total_pages: total_pages,
|
|
93
|
+
results: results)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Provides a human-readable string representation of the object.
|
|
97
|
+
def to_s
|
|
98
|
+
class_name = self.class.name.split('::').last
|
|
99
|
+
"<#{class_name} page_number: #{@page_number}, page_size: #{@page_size}, total_count:"\
|
|
100
|
+
" #{@total_count}, total_pages: #{@total_pages}, results: #{@results}>"
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
104
|
+
def inspect
|
|
105
|
+
class_name = self.class.name.split('::').last
|
|
106
|
+
"<#{class_name} page_number: #{@page_number.inspect}, page_size: #{@page_size.inspect},"\
|
|
107
|
+
" total_count: #{@total_count.inspect}, total_pages: #{@total_pages.inspect}, results:"\
|
|
108
|
+
" #{@results.inspect}>"
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
@@ -1,108 +1,94 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically
|
|
4
|
-
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
-
|
|
6
|
-
module
|
|
7
|
-
# Payment
|
|
8
|
-
class Payment < BaseModel
|
|
9
|
-
SKIP = Object.new
|
|
10
|
-
private_constant :SKIP
|
|
11
|
-
|
|
12
|
-
#
|
|
13
|
-
# @return [
|
|
14
|
-
attr_accessor :
|
|
15
|
-
|
|
16
|
-
#
|
|
17
|
-
# @return [
|
|
18
|
-
attr_accessor :
|
|
19
|
-
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
#
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
@_hash =
|
|
32
|
-
@_hash['
|
|
33
|
-
@_hash['
|
|
34
|
-
@_hash['
|
|
35
|
-
@_hash
|
|
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
|
-
class_name = self.class.name.split('::').last
|
|
96
|
-
"<#{class_name} invoice_amount: #{@invoice_amount}, paid_amount: #{@paid_amount}, currency:"\
|
|
97
|
-
" #{@currency}, due_date: #{@due_date}, additional_properties: #{@additional_properties}>"
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
# Provides a debugging-friendly string with detailed object information.
|
|
101
|
-
def inspect
|
|
102
|
-
class_name = self.class.name.split('::').last
|
|
103
|
-
"<#{class_name} invoice_amount: #{@invoice_amount.inspect}, paid_amount:"\
|
|
104
|
-
" #{@paid_amount.inspect}, currency: #{@currency.inspect}, due_date: #{@due_date.inspect},"\
|
|
105
|
-
" additional_properties: #{@additional_properties}>"
|
|
106
|
-
end
|
|
107
|
-
end
|
|
108
|
-
end
|
|
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
|
+
# Payment Model.
|
|
8
|
+
class Payment < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :currency
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [Date]
|
|
18
|
+
attr_accessor :due_date
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [Float]
|
|
22
|
+
attr_accessor :invoice_amount
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [Float]
|
|
26
|
+
attr_accessor :paid_amount
|
|
27
|
+
|
|
28
|
+
# A mapping from model property names to API property names.
|
|
29
|
+
def self.names
|
|
30
|
+
@_hash = {} if @_hash.nil?
|
|
31
|
+
@_hash['currency'] = 'currency'
|
|
32
|
+
@_hash['due_date'] = 'dueDate'
|
|
33
|
+
@_hash['invoice_amount'] = 'invoiceAmount'
|
|
34
|
+
@_hash['paid_amount'] = 'paidAmount'
|
|
35
|
+
@_hash
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for optional fields
|
|
39
|
+
def self.optionals
|
|
40
|
+
%w[
|
|
41
|
+
currency
|
|
42
|
+
due_date
|
|
43
|
+
invoice_amount
|
|
44
|
+
paid_amount
|
|
45
|
+
]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# An array for nullable fields
|
|
49
|
+
def self.nullables
|
|
50
|
+
%w[
|
|
51
|
+
due_date
|
|
52
|
+
]
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def initialize(currency: SKIP, due_date: SKIP, invoice_amount: SKIP,
|
|
56
|
+
paid_amount: SKIP)
|
|
57
|
+
@currency = currency unless currency == SKIP
|
|
58
|
+
@due_date = due_date unless due_date == SKIP
|
|
59
|
+
@invoice_amount = invoice_amount unless invoice_amount == SKIP
|
|
60
|
+
@paid_amount = paid_amount unless paid_amount == SKIP
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Creates an instance of the object from a hash.
|
|
64
|
+
def self.from_hash(hash)
|
|
65
|
+
return nil unless hash
|
|
66
|
+
|
|
67
|
+
# Extract variables from the hash.
|
|
68
|
+
currency = hash.key?('currency') ? hash['currency'] : SKIP
|
|
69
|
+
due_date = hash.key?('dueDate') ? hash['dueDate'] : SKIP
|
|
70
|
+
invoice_amount = hash.key?('invoiceAmount') ? hash['invoiceAmount'] : SKIP
|
|
71
|
+
paid_amount = hash.key?('paidAmount') ? hash['paidAmount'] : SKIP
|
|
72
|
+
|
|
73
|
+
# Create object from extracted values.
|
|
74
|
+
Payment.new(currency: currency,
|
|
75
|
+
due_date: due_date,
|
|
76
|
+
invoice_amount: invoice_amount,
|
|
77
|
+
paid_amount: paid_amount)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Provides a human-readable string representation of the object.
|
|
81
|
+
def to_s
|
|
82
|
+
class_name = self.class.name.split('::').last
|
|
83
|
+
"<#{class_name} currency: #{@currency}, due_date: #{@due_date}, invoice_amount:"\
|
|
84
|
+
" #{@invoice_amount}, paid_amount: #{@paid_amount}>"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
88
|
+
def inspect
|
|
89
|
+
class_name = self.class.name.split('::').last
|
|
90
|
+
"<#{class_name} currency: #{@currency.inspect}, due_date: #{@due_date.inspect},"\
|
|
91
|
+
" invoice_amount: #{@invoice_amount.inspect}, paid_amount: #{@paid_amount.inspect}>"
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|