apimatic-tql-sdk 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +148 -197
  3. data/bin/console +4 -4
  4. data/lib/freight_financials_webhook_ingestion_api/api_helper.rb +10 -0
  5. data/lib/freight_financials_webhook_ingestion_api/apis/assignments_api.rb +41 -0
  6. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/apis/base_api.rb +60 -60
  7. data/lib/freight_financials_webhook_ingestion_api/apis/documents_api.rb +73 -0
  8. data/lib/freight_financials_webhook_ingestion_api/apis/freight_audit_api.rb +54 -0
  9. data/lib/freight_financials_webhook_ingestion_api/apis/invoices_api.rb +107 -0
  10. data/lib/freight_financials_webhook_ingestion_api/apis/loads_api.rb +72 -0
  11. data/lib/freight_financials_webhook_ingestion_api/apis/rating_api.rb +45 -0
  12. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/client.rb +83 -97
  13. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/configuration.rb +114 -126
  14. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/exceptions/api_exception.rb +21 -21
  15. data/lib/{tql_otr_factoring_data_exchange/exceptions/problem_details_error_exception.rb → freight_financials_webhook_ingestion_api/exceptions/problem_details_exception.rb} +51 -41
  16. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/http/api_response.rb +7 -7
  17. data/lib/freight_financials_webhook_ingestion_api/http/http_call_back.rb +10 -0
  18. data/lib/freight_financials_webhook_ingestion_api/http/http_method_enum.rb +10 -0
  19. data/lib/freight_financials_webhook_ingestion_api/http/http_request.rb +10 -0
  20. data/lib/freight_financials_webhook_ingestion_api/http/http_response.rb +10 -0
  21. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/http/proxy_settings.rb +6 -6
  22. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/logging/configuration/api_logging_configuration.rb +6 -6
  23. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/logging/sdk_logger.rb +6 -6
  24. data/lib/freight_financials_webhook_ingestion_api/models/address.rb +123 -0
  25. data/lib/freight_financials_webhook_ingestion_api/models/assignment_request.rb +94 -0
  26. data/lib/freight_financials_webhook_ingestion_api/models/assignment_response.rb +83 -0
  27. data/lib/{tql_otr_factoring_data_exchange/models/assignment_response.rb → freight_financials_webhook_ingestion_api/models/assignment_response_data.rb} +124 -126
  28. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/models/base_model.rb +110 -110
  29. data/lib/{tql_otr_factoring_data_exchange/models/carrier1.rb → freight_financials_webhook_ingestion_api/models/carrier.rb} +96 -98
  30. data/lib/freight_financials_webhook_ingestion_api/models/charge.rb +104 -0
  31. data/lib/freight_financials_webhook_ingestion_api/models/charge_code.rb +81 -0
  32. data/lib/freight_financials_webhook_ingestion_api/models/factoring_company.rb +81 -0
  33. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/models/invoice.rb +204 -223
  34. data/lib/{tql_otr_factoring_data_exchange/models/document.rb → freight_financials_webhook_ingestion_api/models/invoice_document.rb} +72 -86
  35. data/lib/{tql_otr_factoring_data_exchange/models/invoice_exception.rb → freight_financials_webhook_ingestion_api/models/invoice_issue.rb} +122 -136
  36. data/lib/freight_financials_webhook_ingestion_api/models/invoice_status_response.rb +83 -0
  37. data/lib/{tql_otr_factoring_data_exchange/models/invoice_status_response.rb → freight_financials_webhook_ingestion_api/models/invoice_status_response_data.rb} +185 -193
  38. data/lib/freight_financials_webhook_ingestion_api/models/line_item.rb +131 -0
  39. data/lib/freight_financials_webhook_ingestion_api/models/load_response.rb +83 -0
  40. data/lib/{tql_otr_factoring_data_exchange/models/load_detail.rb → freight_financials_webhook_ingestion_api/models/load_response_data.rb} +141 -140
  41. data/lib/{tql_otr_factoring_data_exchange/models/load.rb → freight_financials_webhook_ingestion_api/models/load_slim.rb} +97 -110
  42. data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb +116 -0
  43. data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_customer.rb +64 -0
  44. data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb +177 -0
  45. data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_request.rb +208 -0
  46. data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_requested_charge.rb +64 -0
  47. data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_response.rb +112 -0
  48. data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb +107 -0
  49. data/lib/freight_financials_webhook_ingestion_api/models/navix_rate_vendor.rb +88 -0
  50. data/lib/freight_financials_webhook_ingestion_api/models/navix_webhook_event_type.rb +56 -0
  51. data/lib/freight_financials_webhook_ingestion_api/models/navix_webhook_request.rb +99 -0
  52. data/lib/freight_financials_webhook_ingestion_api/models/paged_response_of_invoice.rb +111 -0
  53. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/models/payment.rb +94 -108
  54. data/lib/freight_financials_webhook_ingestion_api/models/rating_charge_qualifier.rb +68 -0
  55. data/lib/freight_financials_webhook_ingestion_api/models/rating_response_format.rb +40 -0
  56. data/lib/freight_financials_webhook_ingestion_api/models/reference_number.rb +71 -0
  57. data/lib/{tql_otr_factoring_data_exchange/models/invoice_search_request.rb → freight_financials_webhook_ingestion_api/models/search_request.rb} +223 -242
  58. data/lib/freight_financials_webhook_ingestion_api/models/search_response.rb +83 -0
  59. data/lib/freight_financials_webhook_ingestion_api/models/stop.rb +81 -0
  60. data/lib/freight_financials_webhook_ingestion_api/models/submit_invoice_request.rb +228 -0
  61. data/lib/freight_financials_webhook_ingestion_api/models/submit_invoice_response.rb +83 -0
  62. data/lib/{tql_otr_factoring_data_exchange/models/submit_invoice_response.rb → freight_financials_webhook_ingestion_api/models/submit_invoice_response_data.rb} +105 -107
  63. data/lib/freight_financials_webhook_ingestion_api/models/upload_request.rb +128 -0
  64. data/lib/freight_financials_webhook_ingestion_api/models/upload_response.rb +83 -0
  65. data/lib/{tql_otr_factoring_data_exchange/models/document_upload_response.rb → freight_financials_webhook_ingestion_api/models/upload_response_data.rb} +117 -137
  66. data/lib/freight_financials_webhook_ingestion_api/utilities/date_time_helper.rb +11 -0
  67. data/lib/{tql_otr_factoring_data_exchange → freight_financials_webhook_ingestion_api}/utilities/file_wrapper.rb +17 -17
  68. data/lib/freight_financials_webhook_ingestion_api.rb +127 -0
  69. metadata +67 -74
  70. data/lib/tql_otr_factoring_data_exchange/api_helper.rb +0 -10
  71. data/lib/tql_otr_factoring_data_exchange/apis/assignments_api.rb +0 -45
  72. data/lib/tql_otr_factoring_data_exchange/apis/documents_api.rb +0 -82
  73. data/lib/tql_otr_factoring_data_exchange/apis/invoices_api.rb +0 -114
  74. data/lib/tql_otr_factoring_data_exchange/apis/loads_api.rb +0 -68
  75. data/lib/tql_otr_factoring_data_exchange/apis/oauth_authorization_api.rb +0 -44
  76. data/lib/tql_otr_factoring_data_exchange/exceptions/oauth_provider_exception.rb +0 -64
  77. data/lib/tql_otr_factoring_data_exchange/http/auth/oauth_2.rb +0 -156
  78. data/lib/tql_otr_factoring_data_exchange/http/http_call_back.rb +0 -10
  79. data/lib/tql_otr_factoring_data_exchange/http/http_method_enum.rb +0 -10
  80. data/lib/tql_otr_factoring_data_exchange/http/http_request.rb +0 -10
  81. data/lib/tql_otr_factoring_data_exchange/http/http_response.rb +0 -10
  82. data/lib/tql_otr_factoring_data_exchange/models/assignment_request.rb +0 -140
  83. data/lib/tql_otr_factoring_data_exchange/models/assignment_status.rb +0 -36
  84. data/lib/tql_otr_factoring_data_exchange/models/base64_document.rb +0 -118
  85. data/lib/tql_otr_factoring_data_exchange/models/base64_document_upload_request.rb +0 -107
  86. data/lib/tql_otr_factoring_data_exchange/models/carrier.rb +0 -98
  87. data/lib/tql_otr_factoring_data_exchange/models/carrier2.rb +0 -98
  88. data/lib/tql_otr_factoring_data_exchange/models/carrier_input.rb +0 -123
  89. data/lib/tql_otr_factoring_data_exchange/models/carrier_input1.rb +0 -123
  90. data/lib/tql_otr_factoring_data_exchange/models/charge_code.rb +0 -126
  91. data/lib/tql_otr_factoring_data_exchange/models/charge_code_origin.rb +0 -49
  92. data/lib/tql_otr_factoring_data_exchange/models/charge_input.rb +0 -146
  93. data/lib/tql_otr_factoring_data_exchange/models/document_type.rb +0 -288
  94. data/lib/tql_otr_factoring_data_exchange/models/document_upload_metadata.rb +0 -111
  95. data/lib/tql_otr_factoring_data_exchange/models/exception_severity.rb +0 -40
  96. data/lib/tql_otr_factoring_data_exchange/models/factoring_company_input.rb +0 -117
  97. data/lib/tql_otr_factoring_data_exchange/models/invoice_item_input.rb +0 -165
  98. data/lib/tql_otr_factoring_data_exchange/models/invoice_search_response.rb +0 -124
  99. data/lib/tql_otr_factoring_data_exchange/models/invoice_status.rb +0 -74
  100. data/lib/tql_otr_factoring_data_exchange/models/invoice_type.rb +0 -50
  101. data/lib/tql_otr_factoring_data_exchange/models/load_search_request.rb +0 -205
  102. data/lib/tql_otr_factoring_data_exchange/models/load_search_response.rb +0 -124
  103. data/lib/tql_otr_factoring_data_exchange/models/load_status.rb +0 -56
  104. data/lib/tql_otr_factoring_data_exchange/models/location.rb +0 -149
  105. data/lib/tql_otr_factoring_data_exchange/models/oauth_provider_error.rb +0 -62
  106. data/lib/tql_otr_factoring_data_exchange/models/oauth_scope.rb +0 -36
  107. data/lib/tql_otr_factoring_data_exchange/models/oauth_token.rb +0 -96
  108. data/lib/tql_otr_factoring_data_exchange/models/problem_details.rb +0 -96
  109. data/lib/tql_otr_factoring_data_exchange/models/reference_number_input.rb +0 -109
  110. data/lib/tql_otr_factoring_data_exchange/models/reference_type.rb +0 -90
  111. data/lib/tql_otr_factoring_data_exchange/models/status.rb +0 -44
  112. data/lib/tql_otr_factoring_data_exchange/models/stop_input.rb +0 -121
  113. data/lib/tql_otr_factoring_data_exchange/models/stop_type.rb +0 -62
  114. data/lib/tql_otr_factoring_data_exchange/models/submit_invoice_request.rb +0 -326
  115. data/lib/tql_otr_factoring_data_exchange/models/weight_unit.rb +0 -36
  116. data/lib/tql_otr_factoring_data_exchange/utilities/date_time_helper.rb +0 -11
  117. data/lib/tql_otr_factoring_data_exchange/utilities/union_type_lookup.rb +0 -29
  118. data/lib/tql_otr_factoring_data_exchange.rb +0 -107
@@ -1,165 +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
- # A physical line item on the invoice describing a commodity or handling unit
8
- # being shipped. Items represent the freight itself — what was physically
9
- # moved — as opposed to charges, which represent the monetary billing.
10
- # Including item details enables freight audit and rate verification.
11
- class InvoiceItemInput < BaseModel
12
- SKIP = Object.new
13
- private_constant :SKIP
14
-
15
- # Caller-assigned identifier for this item. Referenced by
16
- # `ChargeInput.itemId` to link a charge to a specific item.
17
- # @return [String]
18
- attr_accessor :item_id
19
-
20
- # Free-text description of the commodity or goods.
21
- # @return [String]
22
- attr_accessor :description
23
-
24
- # Type of handling unit. Common values: Pallet, Drum, Bag, Barrels, Crates,
25
- # Bundles, Pieces, Loose, Boxes, Cases, Carton, Totes.
26
- # @return [String]
27
- attr_accessor :handling_unit
28
-
29
- # Number of handling units for this line item.
30
- # @return [Integer]
31
- attr_accessor :handling_unit_count
32
-
33
- # Weight of this line item.
34
- # @return [Float]
35
- attr_accessor :weight
36
-
37
- # Unit of measure for `weight`. Typically LBS or KG.
38
- # @return [WeightUnit]
39
- attr_accessor :weight_unit
40
-
41
- # NMFC freight class (e.g., 50, 55, 60, 65, 70, 77.5, 85, 92.5, 100, 110,
42
- # 125, 150, 175, 200, 250, 300, 400, 500). Used for LTL rating and audit.
43
- # @return [Float]
44
- attr_accessor :freight_class
45
-
46
- # A mapping from model property names to API property names.
47
- def self.names
48
- @_hash = {} if @_hash.nil?
49
- @_hash['item_id'] = 'itemId'
50
- @_hash['description'] = 'description'
51
- @_hash['handling_unit'] = 'handlingUnit'
52
- @_hash['handling_unit_count'] = 'handlingUnitCount'
53
- @_hash['weight'] = 'weight'
54
- @_hash['weight_unit'] = 'weightUnit'
55
- @_hash['freight_class'] = 'freightClass'
56
- @_hash
57
- end
58
-
59
- # An array for optional fields
60
- def self.optionals
61
- %w[
62
- description
63
- handling_unit
64
- handling_unit_count
65
- weight
66
- weight_unit
67
- freight_class
68
- ]
69
- end
70
-
71
- # An array for nullable fields
72
- def self.nullables
73
- %w[
74
- description
75
- handling_unit
76
- handling_unit_count
77
- weight
78
- weight_unit
79
- freight_class
80
- ]
81
- end
82
-
83
- def initialize(item_id:, description: SKIP, handling_unit: SKIP,
84
- handling_unit_count: SKIP, weight: SKIP,
85
- weight_unit: WeightUnit::LBS, freight_class: SKIP,
86
- additional_properties: nil)
87
- # Add additional model properties to the instance
88
- additional_properties = {} if additional_properties.nil?
89
-
90
- @item_id = item_id
91
- @description = description unless description == SKIP
92
- @handling_unit = handling_unit unless handling_unit == SKIP
93
- @handling_unit_count = handling_unit_count unless handling_unit_count == SKIP
94
- @weight = weight unless weight == SKIP
95
- @weight_unit = weight_unit unless weight_unit == SKIP
96
- @freight_class = freight_class unless freight_class == SKIP
97
- @additional_properties = additional_properties
98
- end
99
-
100
- # Creates an instance of the object from a hash.
101
- def self.from_hash(hash)
102
- return nil unless hash
103
-
104
- # Extract variables from the hash.
105
- item_id = hash.key?('itemId') ? hash['itemId'] : nil
106
- description = hash.key?('description') ? hash['description'] : SKIP
107
- handling_unit = hash.key?('handlingUnit') ? hash['handlingUnit'] : SKIP
108
- handling_unit_count =
109
- hash.key?('handlingUnitCount') ? hash['handlingUnitCount'] : SKIP
110
- weight = hash.key?('weight') ? hash['weight'] : SKIP
111
- weight_unit = hash['weightUnit'] ||= WeightUnit::LBS
112
- freight_class = hash.key?('freightClass') ? hash['freightClass'] : SKIP
113
-
114
- # Create a new hash for additional properties, removing known properties.
115
- new_hash = hash.reject { |k, _| names.value?(k) }
116
-
117
- additional_properties = APIHelper.get_additional_properties(
118
- new_hash, proc { |value| value }
119
- )
120
-
121
- # Create object from extracted values.
122
- InvoiceItemInput.new(item_id: item_id,
123
- description: description,
124
- handling_unit: handling_unit,
125
- handling_unit_count: handling_unit_count,
126
- weight: weight,
127
- weight_unit: weight_unit,
128
- freight_class: freight_class,
129
- additional_properties: additional_properties)
130
- end
131
-
132
- # Validates an instance of the object from a given value.
133
- # @param [InvoiceItemInput | Hash] The value against the validation is performed.
134
- def self.validate(value)
135
- if value.instance_of? self
136
- return APIHelper.valid_type?(value.item_id,
137
- ->(val) { val.instance_of? String })
138
- end
139
-
140
- return false unless value.instance_of? Hash
141
-
142
- APIHelper.valid_type?(value['itemId'],
143
- ->(val) { val.instance_of? String })
144
- end
145
-
146
- # Provides a human-readable string representation of the object.
147
- def to_s
148
- class_name = self.class.name.split('::').last
149
- "<#{class_name} item_id: #{@item_id}, description: #{@description}, handling_unit:"\
150
- " #{@handling_unit}, handling_unit_count: #{@handling_unit_count}, weight: #{@weight},"\
151
- " weight_unit: #{@weight_unit}, freight_class: #{@freight_class}, additional_properties:"\
152
- " #{@additional_properties}>"
153
- end
154
-
155
- # Provides a debugging-friendly string with detailed object information.
156
- def inspect
157
- class_name = self.class.name.split('::').last
158
- "<#{class_name} item_id: #{@item_id.inspect}, description: #{@description.inspect},"\
159
- " handling_unit: #{@handling_unit.inspect}, handling_unit_count:"\
160
- " #{@handling_unit_count.inspect}, weight: #{@weight.inspect}, weight_unit:"\
161
- " #{@weight_unit.inspect}, freight_class: #{@freight_class.inspect}, additional_properties:"\
162
- " #{@additional_properties}>"
163
- end
164
- end
165
- end
@@ -1,124 +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
- # Paginated list of invoice search results.
8
- class InvoiceSearchResponse < BaseModel
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # Current page number.
13
- # @return [Integer]
14
- attr_accessor :page
15
-
16
- # Number of results per page.
17
- # @return [Integer]
18
- attr_accessor :page_size
19
-
20
- # Total number of invoices matching the search criteria.
21
- # @return [Integer]
22
- attr_accessor :total_count
23
-
24
- # Total number of pages.
25
- # @return [Integer]
26
- attr_accessor :total_pages
27
-
28
- # Invoices matching the search criteria for this page.
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'] = 'page'
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
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: SKIP, page_size: SKIP, total_count: SKIP,
60
- total_pages: SKIP, results: SKIP, additional_properties: nil)
61
- # Add additional model properties to the instance
62
- additional_properties = {} if additional_properties.nil?
63
-
64
- @page = page unless page == SKIP
65
- @page_size = page_size unless page_size == SKIP
66
- @total_count = total_count unless total_count == SKIP
67
- @total_pages = total_pages unless total_pages == SKIP
68
- @results = results unless results == SKIP
69
- @additional_properties = additional_properties
70
- end
71
-
72
- # Creates an instance of the object from a hash.
73
- def self.from_hash(hash)
74
- return nil unless hash
75
-
76
- # Extract variables from the hash.
77
- page = hash.key?('page') ? hash['page'] : SKIP
78
- page_size = hash.key?('pageSize') ? hash['pageSize'] : SKIP
79
- total_count = hash.key?('totalCount') ? hash['totalCount'] : SKIP
80
- total_pages = hash.key?('totalPages') ? hash['totalPages'] : SKIP
81
- # Parameter is an array, so we need to iterate through it
82
- results = nil
83
- unless hash['results'].nil?
84
- results = []
85
- hash['results'].each do |structure|
86
- results << (Invoice.from_hash(structure) if structure)
87
- end
88
- end
89
-
90
- results = SKIP unless hash.key?('results')
91
-
92
- # Create a new hash for additional properties, removing known properties.
93
- new_hash = hash.reject { |k, _| names.value?(k) }
94
-
95
- additional_properties = APIHelper.get_additional_properties(
96
- new_hash, proc { |value| value }
97
- )
98
-
99
- # Create object from extracted values.
100
- InvoiceSearchResponse.new(page: page,
101
- page_size: page_size,
102
- total_count: total_count,
103
- total_pages: total_pages,
104
- results: results,
105
- additional_properties: additional_properties)
106
- end
107
-
108
- # Provides a human-readable string representation of the object.
109
- def to_s
110
- class_name = self.class.name.split('::').last
111
- "<#{class_name} page: #{@page}, page_size: #{@page_size}, total_count: #{@total_count},"\
112
- " total_pages: #{@total_pages}, results: #{@results}, additional_properties:"\
113
- " #{@additional_properties}>"
114
- end
115
-
116
- # Provides a debugging-friendly string with detailed object information.
117
- def inspect
118
- class_name = self.class.name.split('::').last
119
- "<#{class_name} page: #{@page.inspect}, page_size: #{@page_size.inspect}, total_count:"\
120
- " #{@total_count.inspect}, total_pages: #{@total_pages.inspect}, results:"\
121
- " #{@results.inspect}, additional_properties: #{@additional_properties}>"
122
- end
123
- end
124
- end
@@ -1,74 +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
- # Processing and payment status of an invoice. The lifecycle typically flows:
8
- # `Received` → `Validating` → `Processing` → `Approved` → `NotPaid` → `Paid`.
9
- # Branches include `AwaitingDocuments`, `PendingExceptions`, and `Rejected`.
10
- class InvoiceStatus
11
- INVOICE_STATUS = [
12
- # TODO: Write general description for RECEIVED
13
- RECEIVED = 'Received'.freeze,
14
-
15
- # TODO: Write general description for VALIDATING
16
- VALIDATING = 'Validating'.freeze,
17
-
18
- # TODO: Write general description for PROCESSING
19
- PROCESSING = 'Processing'.freeze,
20
-
21
- # TODO: Write general description for AWAITINGDOCUMENTS
22
- AWAITINGDOCUMENTS = 'AwaitingDocuments'.freeze,
23
-
24
- # TODO: Write general description for PENDINGEXCEPTIONS
25
- PENDINGEXCEPTIONS = 'PendingExceptions'.freeze,
26
-
27
- # TODO: Write general description for APPROVED
28
- APPROVED = 'Approved'.freeze,
29
-
30
- # TODO: Write general description for NOTPAID
31
- NOTPAID = 'NotPaid'.freeze,
32
-
33
- # TODO: Write general description for PAID
34
- PAID = 'Paid'.freeze,
35
-
36
- # TODO: Write general description for PARTIALLYPAID
37
- PARTIALLYPAID = 'PartiallyPaid'.freeze,
38
-
39
- # TODO: Write general description for COMPLETE
40
- COMPLETE = 'Complete'.freeze,
41
-
42
- # TODO: Write general description for REJECTED
43
- REJECTED = 'Rejected'.freeze
44
- ].freeze
45
-
46
- def self.validate(value)
47
- return false if value.nil?
48
-
49
- INVOICE_STATUS.include?(value)
50
- end
51
-
52
- def self.from_value(value, default_value = RECEIVED)
53
- return default_value if value.nil?
54
-
55
- str = value.to_s.strip
56
-
57
- case str.downcase
58
- when 'received' then RECEIVED
59
- when 'validating' then VALIDATING
60
- when 'processing' then PROCESSING
61
- when 'awaitingdocuments' then AWAITINGDOCUMENTS
62
- when 'pendingexceptions' then PENDINGEXCEPTIONS
63
- when 'approved' then APPROVED
64
- when 'notpaid' then NOTPAID
65
- when 'paid' then PAID
66
- when 'partiallypaid' then PARTIALLYPAID
67
- when 'complete' then COMPLETE
68
- when 'rejected' then REJECTED
69
- else
70
- default_value
71
- end
72
- end
73
- end
74
- end
@@ -1,50 +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
- # Indicates the purpose of the invoice being submitted. - **Invoice** — A
8
- # standard carrier invoice for freight services rendered on a load. This is
9
- # the initial, primary billing submitted by the factoring company on behalf
10
- # of the carrier. - **BalanceDue** — A follow-up invoice for the remaining
11
- # balance after a partial payment or short-pay on a previously submitted
12
- # invoice. Use this type when the original invoice was paid at less than the
13
- # full amount and the carrier is billing for the difference. -
14
- # **Supplemental** — An additional invoice for charges that were not
15
- # included on the original invoice. Common examples include detention
16
- # charges, lumper fees, or other accessorials discovered or finalized after
17
- # the initial invoice was submitted.
18
- class InvoiceType
19
- INVOICE_TYPE = [
20
- # TODO: Write general description for INVOICE
21
- INVOICE = 'Invoice'.freeze,
22
-
23
- # TODO: Write general description for BALANCEDUE
24
- BALANCEDUE = 'BalanceDue'.freeze,
25
-
26
- # TODO: Write general description for SUPPLEMENTAL
27
- SUPPLEMENTAL = 'Supplemental'.freeze
28
- ].freeze
29
-
30
- def self.validate(value)
31
- return false if value.nil?
32
-
33
- INVOICE_TYPE.include?(value)
34
- end
35
-
36
- def self.from_value(value, default_value = INVOICE)
37
- return default_value if value.nil?
38
-
39
- str = value.to_s.strip
40
-
41
- case str.downcase
42
- when 'invoice' then INVOICE
43
- when 'balancedue' then BALANCEDUE
44
- when 'supplemental' then SUPPLEMENTAL
45
- else
46
- default_value
47
- end
48
- end
49
- end
50
- end
@@ -1,205 +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
- # Search filters and pagination for querying TQL loads. All filter fields are
8
- # optional.
9
- class LoadSearchRequest < BaseModel
10
- SKIP = Object.new
11
- private_constant :SKIP
12
-
13
- # 1-based page number.
14
- # @return [Integer]
15
- attr_accessor :page
16
-
17
- # Number of results per page (max 100).
18
- # @return [Integer]
19
- attr_accessor :page_size
20
-
21
- # Filter by one or more TQL load numbers (exact match).
22
- # @return [Array[String]]
23
- attr_accessor :load_numbers
24
-
25
- # Filter by one or more carrier PRO numbers (exact match).
26
- # @return [Array[String]]
27
- attr_accessor :pro_numbers
28
-
29
- # Filter by one or more Bill of Lading numbers (exact match).
30
- # @return [Array[String]]
31
- attr_accessor :bol_numbers
32
-
33
- # Filter by one or more load statuses (OR within the array).
34
- # @return [Array[LoadStatus]]
35
- attr_accessor :statuses
36
-
37
- # Filter by one or more USDOT numbers (exact match).
38
- # @return [Array[String]]
39
- attr_accessor :carrier_dot_numbers
40
-
41
- # Filter by one or more MC numbers (exact match).
42
- # @return [Array[String]]
43
- attr_accessor :carrier_mc_numbers
44
-
45
- # Only return loads with a ship date on or after this date.
46
- # @return [Date]
47
- attr_accessor :ship_date_after
48
-
49
- # Only return loads with a ship date before this date.
50
- # @return [Date]
51
- attr_accessor :ship_date_before
52
-
53
- # Only return loads with a delivery date on or after this date.
54
- # @return [Date]
55
- attr_accessor :delivery_date_after
56
-
57
- # Only return loads with a delivery date before this date.
58
- # @return [Date]
59
- attr_accessor :delivery_date_before
60
-
61
- # A mapping from model property names to API property names.
62
- def self.names
63
- @_hash = {} if @_hash.nil?
64
- @_hash['page'] = 'page'
65
- @_hash['page_size'] = 'pageSize'
66
- @_hash['load_numbers'] = 'loadNumbers'
67
- @_hash['pro_numbers'] = 'proNumbers'
68
- @_hash['bol_numbers'] = 'bolNumbers'
69
- @_hash['statuses'] = 'statuses'
70
- @_hash['carrier_dot_numbers'] = 'carrierDotNumbers'
71
- @_hash['carrier_mc_numbers'] = 'carrierMcNumbers'
72
- @_hash['ship_date_after'] = 'shipDateAfter'
73
- @_hash['ship_date_before'] = 'shipDateBefore'
74
- @_hash['delivery_date_after'] = 'deliveryDateAfter'
75
- @_hash['delivery_date_before'] = 'deliveryDateBefore'
76
- @_hash
77
- end
78
-
79
- # An array for optional fields
80
- def self.optionals
81
- %w[
82
- load_numbers
83
- pro_numbers
84
- bol_numbers
85
- statuses
86
- carrier_dot_numbers
87
- carrier_mc_numbers
88
- ship_date_after
89
- ship_date_before
90
- delivery_date_after
91
- delivery_date_before
92
- ]
93
- end
94
-
95
- # An array for nullable fields
96
- def self.nullables
97
- %w[
98
- load_numbers
99
- pro_numbers
100
- bol_numbers
101
- statuses
102
- carrier_dot_numbers
103
- carrier_mc_numbers
104
- ship_date_after
105
- ship_date_before
106
- delivery_date_after
107
- delivery_date_before
108
- ]
109
- end
110
-
111
- def initialize(page:, page_size:, load_numbers: SKIP, pro_numbers: SKIP,
112
- bol_numbers: SKIP, statuses: SKIP, carrier_dot_numbers: SKIP,
113
- carrier_mc_numbers: SKIP, ship_date_after: SKIP,
114
- ship_date_before: SKIP, delivery_date_after: SKIP,
115
- delivery_date_before: SKIP, additional_properties: nil)
116
- # Add additional model properties to the instance
117
- additional_properties = {} if additional_properties.nil?
118
-
119
- @page = page
120
- @page_size = page_size
121
- @load_numbers = load_numbers unless load_numbers == SKIP
122
- @pro_numbers = pro_numbers unless pro_numbers == SKIP
123
- @bol_numbers = bol_numbers unless bol_numbers == SKIP
124
- @statuses = statuses unless statuses == SKIP
125
- @carrier_dot_numbers = carrier_dot_numbers unless carrier_dot_numbers == SKIP
126
- @carrier_mc_numbers = carrier_mc_numbers unless carrier_mc_numbers == SKIP
127
- @ship_date_after = ship_date_after unless ship_date_after == SKIP
128
- @ship_date_before = ship_date_before unless ship_date_before == SKIP
129
- @delivery_date_after = delivery_date_after unless delivery_date_after == SKIP
130
- @delivery_date_before = delivery_date_before unless delivery_date_before == SKIP
131
- @additional_properties = additional_properties
132
- end
133
-
134
- # Creates an instance of the object from a hash.
135
- def self.from_hash(hash)
136
- return nil unless hash
137
-
138
- # Extract variables from the hash.
139
- page = hash.key?('page') ? hash['page'] : nil
140
- page_size = hash.key?('pageSize') ? hash['pageSize'] : nil
141
- load_numbers = hash.key?('loadNumbers') ? hash['loadNumbers'] : SKIP
142
- pro_numbers = hash.key?('proNumbers') ? hash['proNumbers'] : SKIP
143
- bol_numbers = hash.key?('bolNumbers') ? hash['bolNumbers'] : SKIP
144
- statuses = hash.key?('statuses') ? hash['statuses'] : SKIP
145
- carrier_dot_numbers =
146
- hash.key?('carrierDotNumbers') ? hash['carrierDotNumbers'] : SKIP
147
- carrier_mc_numbers =
148
- hash.key?('carrierMcNumbers') ? hash['carrierMcNumbers'] : SKIP
149
- ship_date_after =
150
- hash.key?('shipDateAfter') ? hash['shipDateAfter'] : SKIP
151
- ship_date_before =
152
- hash.key?('shipDateBefore') ? hash['shipDateBefore'] : SKIP
153
- delivery_date_after =
154
- hash.key?('deliveryDateAfter') ? hash['deliveryDateAfter'] : SKIP
155
- delivery_date_before =
156
- hash.key?('deliveryDateBefore') ? hash['deliveryDateBefore'] : SKIP
157
-
158
- # Create a new hash for additional properties, removing known properties.
159
- new_hash = hash.reject { |k, _| names.value?(k) }
160
-
161
- additional_properties = APIHelper.get_additional_properties(
162
- new_hash, proc { |value| value }
163
- )
164
-
165
- # Create object from extracted values.
166
- LoadSearchRequest.new(page: page,
167
- page_size: page_size,
168
- load_numbers: load_numbers,
169
- pro_numbers: pro_numbers,
170
- bol_numbers: bol_numbers,
171
- statuses: statuses,
172
- carrier_dot_numbers: carrier_dot_numbers,
173
- carrier_mc_numbers: carrier_mc_numbers,
174
- ship_date_after: ship_date_after,
175
- ship_date_before: ship_date_before,
176
- delivery_date_after: delivery_date_after,
177
- delivery_date_before: delivery_date_before,
178
- additional_properties: additional_properties)
179
- end
180
-
181
- # Provides a human-readable string representation of the object.
182
- def to_s
183
- class_name = self.class.name.split('::').last
184
- "<#{class_name} page: #{@page}, page_size: #{@page_size}, load_numbers: #{@load_numbers},"\
185
- " pro_numbers: #{@pro_numbers}, bol_numbers: #{@bol_numbers}, statuses: #{@statuses},"\
186
- " carrier_dot_numbers: #{@carrier_dot_numbers}, carrier_mc_numbers: #{@carrier_mc_numbers},"\
187
- " ship_date_after: #{@ship_date_after}, ship_date_before: #{@ship_date_before},"\
188
- " delivery_date_after: #{@delivery_date_after}, delivery_date_before:"\
189
- " #{@delivery_date_before}, additional_properties: #{@additional_properties}>"
190
- end
191
-
192
- # Provides a debugging-friendly string with detailed object information.
193
- def inspect
194
- class_name = self.class.name.split('::').last
195
- "<#{class_name} page: #{@page.inspect}, page_size: #{@page_size.inspect}, load_numbers:"\
196
- " #{@load_numbers.inspect}, pro_numbers: #{@pro_numbers.inspect}, bol_numbers:"\
197
- " #{@bol_numbers.inspect}, statuses: #{@statuses.inspect}, carrier_dot_numbers:"\
198
- " #{@carrier_dot_numbers.inspect}, carrier_mc_numbers: #{@carrier_mc_numbers.inspect},"\
199
- " ship_date_after: #{@ship_date_after.inspect}, ship_date_before:"\
200
- " #{@ship_date_before.inspect}, delivery_date_after: #{@delivery_date_after.inspect},"\
201
- " delivery_date_before: #{@delivery_date_before.inspect}, additional_properties:"\
202
- " #{@additional_properties}>"
203
- end
204
- end
205
- end