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,83 @@
|
|
|
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
|
+
# SearchResponse Model.
|
|
8
|
+
class SearchResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [PagedResponseOfInvoice]
|
|
14
|
+
attr_accessor :data
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [Array[String]]
|
|
18
|
+
attr_accessor :errors
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [TrueClass | FalseClass]
|
|
22
|
+
attr_accessor :is_success
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['data'] = 'data'
|
|
28
|
+
@_hash['errors'] = 'errors'
|
|
29
|
+
@_hash['is_success'] = 'isSuccess'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
data
|
|
37
|
+
errors
|
|
38
|
+
is_success
|
|
39
|
+
]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for nullable fields
|
|
43
|
+
def self.nullables
|
|
44
|
+
%w[
|
|
45
|
+
data
|
|
46
|
+
]
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def initialize(data: SKIP, errors: SKIP, is_success: SKIP)
|
|
50
|
+
@data = data unless data == SKIP
|
|
51
|
+
@errors = errors unless errors == SKIP
|
|
52
|
+
@is_success = is_success unless is_success == SKIP
|
|
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
|
+
data = PagedResponseOfInvoice.from_hash(hash['data']) if hash['data']
|
|
61
|
+
errors = hash.key?('errors') ? hash['errors'] : SKIP
|
|
62
|
+
is_success = hash.key?('isSuccess') ? hash['isSuccess'] : SKIP
|
|
63
|
+
|
|
64
|
+
# Create object from extracted values.
|
|
65
|
+
SearchResponse.new(data: data,
|
|
66
|
+
errors: errors,
|
|
67
|
+
is_success: is_success)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Provides a human-readable string representation of the object.
|
|
71
|
+
def to_s
|
|
72
|
+
class_name = self.class.name.split('::').last
|
|
73
|
+
"<#{class_name} data: #{@data}, errors: #{@errors}, is_success: #{@is_success}>"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
77
|
+
def inspect
|
|
78
|
+
class_name = self.class.name.split('::').last
|
|
79
|
+
"<#{class_name} data: #{@data.inspect}, errors: #{@errors.inspect}, is_success:"\
|
|
80
|
+
" #{@is_success.inspect}>"
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
# Stop Model.
|
|
8
|
+
class Stop < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Address]
|
|
14
|
+
attr_accessor :location
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [Integer]
|
|
18
|
+
attr_accessor :sequence
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [Integer]
|
|
22
|
+
attr_accessor :stop_type
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['location'] = 'location'
|
|
28
|
+
@_hash['sequence'] = 'sequence'
|
|
29
|
+
@_hash['stop_type'] = 'stopType'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
location
|
|
37
|
+
sequence
|
|
38
|
+
stop_type
|
|
39
|
+
]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for nullable fields
|
|
43
|
+
def self.nullables
|
|
44
|
+
[]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def initialize(location: SKIP, sequence: SKIP, stop_type: SKIP)
|
|
48
|
+
@location = location unless location == SKIP
|
|
49
|
+
@sequence = sequence unless sequence == SKIP
|
|
50
|
+
@stop_type = stop_type unless stop_type == SKIP
|
|
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
|
+
location = Address.from_hash(hash['location']) if hash['location']
|
|
59
|
+
sequence = hash.key?('sequence') ? hash['sequence'] : SKIP
|
|
60
|
+
stop_type = hash.key?('stopType') ? hash['stopType'] : SKIP
|
|
61
|
+
|
|
62
|
+
# Create object from extracted values.
|
|
63
|
+
Stop.new(location: location,
|
|
64
|
+
sequence: sequence,
|
|
65
|
+
stop_type: stop_type)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Provides a human-readable string representation of the object.
|
|
69
|
+
def to_s
|
|
70
|
+
class_name = self.class.name.split('::').last
|
|
71
|
+
"<#{class_name} location: #{@location}, sequence: #{@sequence}, stop_type: #{@stop_type}>"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
75
|
+
def inspect
|
|
76
|
+
class_name = self.class.name.split('::').last
|
|
77
|
+
"<#{class_name} location: #{@location.inspect}, sequence: #{@sequence.inspect}, stop_type:"\
|
|
78
|
+
" #{@stop_type.inspect}>"
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
@@ -0,0 +1,228 @@
|
|
|
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
|
+
# SubmitInvoiceRequest Model.
|
|
8
|
+
class SubmitInvoiceRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Carrier]
|
|
14
|
+
attr_accessor :carrier
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :carrier_invoice_number
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [Array[Charge]]
|
|
22
|
+
attr_accessor :charges
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [FactoringCompany]
|
|
26
|
+
attr_accessor :factoring_company
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for this method
|
|
29
|
+
# @return [Date]
|
|
30
|
+
attr_accessor :invoice_date
|
|
31
|
+
|
|
32
|
+
# TODO: Write general description for this method
|
|
33
|
+
# @return [Date]
|
|
34
|
+
attr_accessor :invoice_due_date
|
|
35
|
+
|
|
36
|
+
# TODO: Write general description for this method
|
|
37
|
+
# @return [String]
|
|
38
|
+
attr_accessor :invoice_number
|
|
39
|
+
|
|
40
|
+
# TODO: Write general description for this method
|
|
41
|
+
# @return [Array[LineItem]]
|
|
42
|
+
attr_accessor :items
|
|
43
|
+
|
|
44
|
+
# TODO: Write general description for this method
|
|
45
|
+
# @return [String]
|
|
46
|
+
attr_accessor :load_number
|
|
47
|
+
|
|
48
|
+
# TODO: Write general description for this method
|
|
49
|
+
# @return [String]
|
|
50
|
+
attr_accessor :payment_terms
|
|
51
|
+
|
|
52
|
+
# TODO: Write general description for this method
|
|
53
|
+
# @return [Array[ReferenceNumber]]
|
|
54
|
+
attr_accessor :reference_numbers
|
|
55
|
+
|
|
56
|
+
# TODO: Write general description for this method
|
|
57
|
+
# @return [Array[Stop]]
|
|
58
|
+
attr_accessor :stops
|
|
59
|
+
|
|
60
|
+
# TODO: Write general description for this method
|
|
61
|
+
# @return [Integer]
|
|
62
|
+
attr_accessor :type
|
|
63
|
+
|
|
64
|
+
# A mapping from model property names to API property names.
|
|
65
|
+
def self.names
|
|
66
|
+
@_hash = {} if @_hash.nil?
|
|
67
|
+
@_hash['carrier'] = 'carrier'
|
|
68
|
+
@_hash['carrier_invoice_number'] = 'carrierInvoiceNumber'
|
|
69
|
+
@_hash['charges'] = 'charges'
|
|
70
|
+
@_hash['factoring_company'] = 'factoringCompany'
|
|
71
|
+
@_hash['invoice_date'] = 'invoiceDate'
|
|
72
|
+
@_hash['invoice_due_date'] = 'invoiceDueDate'
|
|
73
|
+
@_hash['invoice_number'] = 'invoiceNumber'
|
|
74
|
+
@_hash['items'] = 'items'
|
|
75
|
+
@_hash['load_number'] = 'loadNumber'
|
|
76
|
+
@_hash['payment_terms'] = 'paymentTerms'
|
|
77
|
+
@_hash['reference_numbers'] = 'referenceNumbers'
|
|
78
|
+
@_hash['stops'] = 'stops'
|
|
79
|
+
@_hash['type'] = 'type'
|
|
80
|
+
@_hash
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# An array for optional fields
|
|
84
|
+
def self.optionals
|
|
85
|
+
%w[
|
|
86
|
+
carrier
|
|
87
|
+
carrier_invoice_number
|
|
88
|
+
charges
|
|
89
|
+
factoring_company
|
|
90
|
+
invoice_date
|
|
91
|
+
invoice_due_date
|
|
92
|
+
invoice_number
|
|
93
|
+
items
|
|
94
|
+
load_number
|
|
95
|
+
payment_terms
|
|
96
|
+
reference_numbers
|
|
97
|
+
stops
|
|
98
|
+
type
|
|
99
|
+
]
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# An array for nullable fields
|
|
103
|
+
def self.nullables
|
|
104
|
+
%w[
|
|
105
|
+
carrier_invoice_number
|
|
106
|
+
invoice_due_date
|
|
107
|
+
payment_terms
|
|
108
|
+
]
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def initialize(carrier: SKIP, carrier_invoice_number: SKIP, charges: SKIP,
|
|
112
|
+
factoring_company: SKIP, invoice_date: SKIP,
|
|
113
|
+
invoice_due_date: SKIP, invoice_number: SKIP, items: SKIP,
|
|
114
|
+
load_number: SKIP, payment_terms: SKIP,
|
|
115
|
+
reference_numbers: SKIP, stops: SKIP, type: SKIP)
|
|
116
|
+
@carrier = carrier unless carrier == SKIP
|
|
117
|
+
@carrier_invoice_number = carrier_invoice_number unless carrier_invoice_number == SKIP
|
|
118
|
+
@charges = charges unless charges == SKIP
|
|
119
|
+
@factoring_company = factoring_company unless factoring_company == SKIP
|
|
120
|
+
@invoice_date = invoice_date unless invoice_date == SKIP
|
|
121
|
+
@invoice_due_date = invoice_due_date unless invoice_due_date == SKIP
|
|
122
|
+
@invoice_number = invoice_number unless invoice_number == SKIP
|
|
123
|
+
@items = items unless items == SKIP
|
|
124
|
+
@load_number = load_number unless load_number == SKIP
|
|
125
|
+
@payment_terms = payment_terms unless payment_terms == SKIP
|
|
126
|
+
@reference_numbers = reference_numbers unless reference_numbers == SKIP
|
|
127
|
+
@stops = stops unless stops == SKIP
|
|
128
|
+
@type = type unless type == SKIP
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Creates an instance of the object from a hash.
|
|
132
|
+
def self.from_hash(hash)
|
|
133
|
+
return nil unless hash
|
|
134
|
+
|
|
135
|
+
# Extract variables from the hash.
|
|
136
|
+
carrier = Carrier.from_hash(hash['carrier']) if hash['carrier']
|
|
137
|
+
carrier_invoice_number =
|
|
138
|
+
hash.key?('carrierInvoiceNumber') ? hash['carrierInvoiceNumber'] : SKIP
|
|
139
|
+
# Parameter is an array, so we need to iterate through it
|
|
140
|
+
charges = nil
|
|
141
|
+
unless hash['charges'].nil?
|
|
142
|
+
charges = []
|
|
143
|
+
hash['charges'].each do |structure|
|
|
144
|
+
charges << (Charge.from_hash(structure) if structure)
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
charges = SKIP unless hash.key?('charges')
|
|
149
|
+
factoring_company = FactoringCompany.from_hash(hash['factoringCompany']) if
|
|
150
|
+
hash['factoringCompany']
|
|
151
|
+
invoice_date = hash.key?('invoiceDate') ? hash['invoiceDate'] : SKIP
|
|
152
|
+
invoice_due_date =
|
|
153
|
+
hash.key?('invoiceDueDate') ? hash['invoiceDueDate'] : SKIP
|
|
154
|
+
invoice_number = hash.key?('invoiceNumber') ? hash['invoiceNumber'] : SKIP
|
|
155
|
+
# Parameter is an array, so we need to iterate through it
|
|
156
|
+
items = nil
|
|
157
|
+
unless hash['items'].nil?
|
|
158
|
+
items = []
|
|
159
|
+
hash['items'].each do |structure|
|
|
160
|
+
items << (LineItem.from_hash(structure) if structure)
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
items = SKIP unless hash.key?('items')
|
|
165
|
+
load_number = hash.key?('loadNumber') ? hash['loadNumber'] : SKIP
|
|
166
|
+
payment_terms = hash.key?('paymentTerms') ? hash['paymentTerms'] : SKIP
|
|
167
|
+
# Parameter is an array, so we need to iterate through it
|
|
168
|
+
reference_numbers = nil
|
|
169
|
+
unless hash['referenceNumbers'].nil?
|
|
170
|
+
reference_numbers = []
|
|
171
|
+
hash['referenceNumbers'].each do |structure|
|
|
172
|
+
reference_numbers << (ReferenceNumber.from_hash(structure) if structure)
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
reference_numbers = SKIP unless hash.key?('referenceNumbers')
|
|
177
|
+
# Parameter is an array, so we need to iterate through it
|
|
178
|
+
stops = nil
|
|
179
|
+
unless hash['stops'].nil?
|
|
180
|
+
stops = []
|
|
181
|
+
hash['stops'].each do |structure|
|
|
182
|
+
stops << (Stop.from_hash(structure) if structure)
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
stops = SKIP unless hash.key?('stops')
|
|
187
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
188
|
+
|
|
189
|
+
# Create object from extracted values.
|
|
190
|
+
SubmitInvoiceRequest.new(carrier: carrier,
|
|
191
|
+
carrier_invoice_number: carrier_invoice_number,
|
|
192
|
+
charges: charges,
|
|
193
|
+
factoring_company: factoring_company,
|
|
194
|
+
invoice_date: invoice_date,
|
|
195
|
+
invoice_due_date: invoice_due_date,
|
|
196
|
+
invoice_number: invoice_number,
|
|
197
|
+
items: items,
|
|
198
|
+
load_number: load_number,
|
|
199
|
+
payment_terms: payment_terms,
|
|
200
|
+
reference_numbers: reference_numbers,
|
|
201
|
+
stops: stops,
|
|
202
|
+
type: type)
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Provides a human-readable string representation of the object.
|
|
206
|
+
def to_s
|
|
207
|
+
class_name = self.class.name.split('::').last
|
|
208
|
+
"<#{class_name} carrier: #{@carrier}, carrier_invoice_number: #{@carrier_invoice_number},"\
|
|
209
|
+
" charges: #{@charges}, factoring_company: #{@factoring_company}, invoice_date:"\
|
|
210
|
+
" #{@invoice_date}, invoice_due_date: #{@invoice_due_date}, invoice_number:"\
|
|
211
|
+
" #{@invoice_number}, items: #{@items}, load_number: #{@load_number}, payment_terms:"\
|
|
212
|
+
" #{@payment_terms}, reference_numbers: #{@reference_numbers}, stops: #{@stops}, type:"\
|
|
213
|
+
" #{@type}>"
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
217
|
+
def inspect
|
|
218
|
+
class_name = self.class.name.split('::').last
|
|
219
|
+
"<#{class_name} carrier: #{@carrier.inspect}, carrier_invoice_number:"\
|
|
220
|
+
" #{@carrier_invoice_number.inspect}, charges: #{@charges.inspect}, factoring_company:"\
|
|
221
|
+
" #{@factoring_company.inspect}, invoice_date: #{@invoice_date.inspect}, invoice_due_date:"\
|
|
222
|
+
" #{@invoice_due_date.inspect}, invoice_number: #{@invoice_number.inspect}, items:"\
|
|
223
|
+
" #{@items.inspect}, load_number: #{@load_number.inspect}, payment_terms:"\
|
|
224
|
+
" #{@payment_terms.inspect}, reference_numbers: #{@reference_numbers.inspect}, stops:"\
|
|
225
|
+
" #{@stops.inspect}, type: #{@type.inspect}>"
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
# SubmitInvoiceResponse Model.
|
|
8
|
+
class SubmitInvoiceResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [SubmitInvoiceResponseData]
|
|
14
|
+
attr_accessor :data
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [Array[String]]
|
|
18
|
+
attr_accessor :errors
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [TrueClass | FalseClass]
|
|
22
|
+
attr_accessor :is_success
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['data'] = 'data'
|
|
28
|
+
@_hash['errors'] = 'errors'
|
|
29
|
+
@_hash['is_success'] = 'isSuccess'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
data
|
|
37
|
+
errors
|
|
38
|
+
is_success
|
|
39
|
+
]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for nullable fields
|
|
43
|
+
def self.nullables
|
|
44
|
+
%w[
|
|
45
|
+
data
|
|
46
|
+
]
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def initialize(data: SKIP, errors: SKIP, is_success: SKIP)
|
|
50
|
+
@data = data unless data == SKIP
|
|
51
|
+
@errors = errors unless errors == SKIP
|
|
52
|
+
@is_success = is_success unless is_success == SKIP
|
|
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
|
+
data = SubmitInvoiceResponseData.from_hash(hash['data']) if hash['data']
|
|
61
|
+
errors = hash.key?('errors') ? hash['errors'] : SKIP
|
|
62
|
+
is_success = hash.key?('isSuccess') ? hash['isSuccess'] : SKIP
|
|
63
|
+
|
|
64
|
+
# Create object from extracted values.
|
|
65
|
+
SubmitInvoiceResponse.new(data: data,
|
|
66
|
+
errors: errors,
|
|
67
|
+
is_success: is_success)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Provides a human-readable string representation of the object.
|
|
71
|
+
def to_s
|
|
72
|
+
class_name = self.class.name.split('::').last
|
|
73
|
+
"<#{class_name} data: #{@data}, errors: #{@errors}, is_success: #{@is_success}>"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
77
|
+
def inspect
|
|
78
|
+
class_name = self.class.name.split('::').last
|
|
79
|
+
"<#{class_name} data: #{@data.inspect}, errors: #{@errors.inspect}, is_success:"\
|
|
80
|
+
" #{@is_success.inspect}>"
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|