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,140 +1,141 @@
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
- # Basic details of a TQL load.
8
- class LoadDetail < BaseModel
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # The TQL load number.
13
- # @return [String]
14
- attr_accessor :load_number
15
-
16
- # Carrier's PRO (progressive) number, if available.
17
- # @return [String]
18
- attr_accessor :pro_number
19
-
20
- # Bill of Lading number, if available.
21
- # @return [String]
22
- attr_accessor :bol_number
23
-
24
- # Current status of a TQL load.
25
- # @return [LoadStatus]
26
- attr_accessor :status
27
-
28
- # Carrier assigned to this load.
29
- # @return [Carrier2]
30
- attr_accessor :carrier
31
-
32
- # Date the load was (or is scheduled to be) picked up.
33
- # @return [Date]
34
- attr_accessor :ship_date
35
-
36
- # Date the load was (or is scheduled to be) delivered.
37
- # @return [Date]
38
- attr_accessor :delivery_date
39
-
40
- # A mapping from model property names to API property names.
41
- def self.names
42
- @_hash = {} if @_hash.nil?
43
- @_hash['load_number'] = 'loadNumber'
44
- @_hash['pro_number'] = 'proNumber'
45
- @_hash['bol_number'] = 'bolNumber'
46
- @_hash['status'] = 'status'
47
- @_hash['carrier'] = 'carrier'
48
- @_hash['ship_date'] = 'shipDate'
49
- @_hash['delivery_date'] = 'deliveryDate'
50
- @_hash
51
- end
52
-
53
- # An array for optional fields
54
- def self.optionals
55
- %w[
56
- load_number
57
- pro_number
58
- bol_number
59
- status
60
- carrier
61
- ship_date
62
- delivery_date
63
- ]
64
- end
65
-
66
- # An array for nullable fields
67
- def self.nullables
68
- %w[
69
- pro_number
70
- bol_number
71
- ship_date
72
- delivery_date
73
- ]
74
- end
75
-
76
- def initialize(load_number: SKIP, pro_number: SKIP, bol_number: SKIP,
77
- status: SKIP, carrier: SKIP, ship_date: SKIP,
78
- delivery_date: SKIP, additional_properties: nil)
79
- # Add additional model properties to the instance
80
- additional_properties = {} if additional_properties.nil?
81
-
82
- @load_number = load_number unless load_number == SKIP
83
- @pro_number = pro_number unless pro_number == SKIP
84
- @bol_number = bol_number unless bol_number == SKIP
85
- @status = status unless status == SKIP
86
- @carrier = carrier unless carrier == SKIP
87
- @ship_date = ship_date unless ship_date == SKIP
88
- @delivery_date = delivery_date unless delivery_date == SKIP
89
- @additional_properties = additional_properties
90
- end
91
-
92
- # Creates an instance of the object from a hash.
93
- def self.from_hash(hash)
94
- return nil unless hash
95
-
96
- # Extract variables from the hash.
97
- load_number = hash.key?('loadNumber') ? hash['loadNumber'] : SKIP
98
- pro_number = hash.key?('proNumber') ? hash['proNumber'] : SKIP
99
- bol_number = hash.key?('bolNumber') ? hash['bolNumber'] : SKIP
100
- status = hash.key?('status') ? hash['status'] : SKIP
101
- carrier = Carrier2.from_hash(hash['carrier']) if hash['carrier']
102
- ship_date = hash.key?('shipDate') ? hash['shipDate'] : SKIP
103
- delivery_date = hash.key?('deliveryDate') ? hash['deliveryDate'] : SKIP
104
-
105
- # Create a new hash for additional properties, removing known properties.
106
- new_hash = hash.reject { |k, _| names.value?(k) }
107
-
108
- additional_properties = APIHelper.get_additional_properties(
109
- new_hash, proc { |value| value }
110
- )
111
-
112
- # Create object from extracted values.
113
- LoadDetail.new(load_number: load_number,
114
- pro_number: pro_number,
115
- bol_number: bol_number,
116
- status: status,
117
- carrier: carrier,
118
- ship_date: ship_date,
119
- delivery_date: delivery_date,
120
- additional_properties: additional_properties)
121
- end
122
-
123
- # Provides a human-readable string representation of the object.
124
- def to_s
125
- class_name = self.class.name.split('::').last
126
- "<#{class_name} load_number: #{@load_number}, pro_number: #{@pro_number}, bol_number:"\
127
- " #{@bol_number}, status: #{@status}, carrier: #{@carrier}, ship_date: #{@ship_date},"\
128
- " delivery_date: #{@delivery_date}, additional_properties: #{@additional_properties}>"
129
- end
130
-
131
- # Provides a debugging-friendly string with detailed object information.
132
- def inspect
133
- class_name = self.class.name.split('::').last
134
- "<#{class_name} load_number: #{@load_number.inspect}, pro_number: #{@pro_number.inspect},"\
135
- " bol_number: #{@bol_number.inspect}, status: #{@status.inspect}, carrier:"\
136
- " #{@carrier.inspect}, ship_date: #{@ship_date.inspect}, delivery_date:"\
137
- " #{@delivery_date.inspect}, additional_properties: #{@additional_properties}>"
138
- end
139
- end
140
- 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
+ # LoadResponseData Model.
8
+ class LoadResponseData < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :bol_number
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Carrier]
18
+ attr_accessor :carrier
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Date]
22
+ attr_accessor :delivery_date
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [String]
26
+ attr_accessor :load_number
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [String]
30
+ attr_accessor :pro_number
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [Date]
34
+ attr_accessor :ship_date
35
+
36
+ # TODO: Write general description for this method
37
+ # @return [Integer]
38
+ attr_accessor :status
39
+
40
+ # A mapping from model property names to API property names.
41
+ def self.names
42
+ @_hash = {} if @_hash.nil?
43
+ @_hash['bol_number'] = 'bolNumber'
44
+ @_hash['carrier'] = 'carrier'
45
+ @_hash['delivery_date'] = 'deliveryDate'
46
+ @_hash['load_number'] = 'loadNumber'
47
+ @_hash['pro_number'] = 'proNumber'
48
+ @_hash['ship_date'] = 'shipDate'
49
+ @_hash['status'] = 'status'
50
+ @_hash
51
+ end
52
+
53
+ # An array for optional fields
54
+ def self.optionals
55
+ %w[
56
+ bol_number
57
+ carrier
58
+ delivery_date
59
+ load_number
60
+ pro_number
61
+ ship_date
62
+ status
63
+ ]
64
+ end
65
+
66
+ # An array for nullable fields
67
+ def self.nullables
68
+ %w[
69
+ bol_number
70
+ carrier
71
+ delivery_date
72
+ pro_number
73
+ ship_date
74
+ ]
75
+ end
76
+
77
+ def initialize(bol_number: SKIP, carrier: SKIP, delivery_date: SKIP,
78
+ load_number: SKIP, pro_number: SKIP, ship_date: SKIP,
79
+ status: SKIP, additional_properties: nil)
80
+ # Add additional model properties to the instance
81
+ additional_properties = {} if additional_properties.nil?
82
+
83
+ @bol_number = bol_number unless bol_number == SKIP
84
+ @carrier = carrier unless carrier == SKIP
85
+ @delivery_date = delivery_date unless delivery_date == SKIP
86
+ @load_number = load_number unless load_number == SKIP
87
+ @pro_number = pro_number unless pro_number == SKIP
88
+ @ship_date = ship_date unless ship_date == SKIP
89
+ @status = status unless status == SKIP
90
+ @additional_properties = additional_properties
91
+ end
92
+
93
+ # Creates an instance of the object from a hash.
94
+ def self.from_hash(hash)
95
+ return nil unless hash
96
+
97
+ # Extract variables from the hash.
98
+ bol_number = hash.key?('bolNumber') ? hash['bolNumber'] : SKIP
99
+ carrier = Carrier.from_hash(hash['carrier']) if hash['carrier']
100
+ delivery_date = hash.key?('deliveryDate') ? hash['deliveryDate'] : SKIP
101
+ load_number = hash.key?('loadNumber') ? hash['loadNumber'] : SKIP
102
+ pro_number = hash.key?('proNumber') ? hash['proNumber'] : SKIP
103
+ ship_date = hash.key?('shipDate') ? hash['shipDate'] : SKIP
104
+ status = hash.key?('status') ? hash['status'] : SKIP
105
+
106
+ # Create a new hash for additional properties, removing known properties.
107
+ new_hash = hash.reject { |k, _| names.value?(k) }
108
+
109
+ additional_properties = APIHelper.get_additional_properties(
110
+ new_hash, proc { |value| value }
111
+ )
112
+
113
+ # Create object from extracted values.
114
+ LoadResponseData.new(bol_number: bol_number,
115
+ carrier: carrier,
116
+ delivery_date: delivery_date,
117
+ load_number: load_number,
118
+ pro_number: pro_number,
119
+ ship_date: ship_date,
120
+ status: status,
121
+ additional_properties: additional_properties)
122
+ end
123
+
124
+ # Provides a human-readable string representation of the object.
125
+ def to_s
126
+ class_name = self.class.name.split('::').last
127
+ "<#{class_name} bol_number: #{@bol_number}, carrier: #{@carrier}, delivery_date:"\
128
+ " #{@delivery_date}, load_number: #{@load_number}, pro_number: #{@pro_number}, ship_date:"\
129
+ " #{@ship_date}, status: #{@status}, additional_properties: #{@additional_properties}>"
130
+ end
131
+
132
+ # Provides a debugging-friendly string with detailed object information.
133
+ def inspect
134
+ class_name = self.class.name.split('::').last
135
+ "<#{class_name} bol_number: #{@bol_number.inspect}, carrier: #{@carrier.inspect},"\
136
+ " delivery_date: #{@delivery_date.inspect}, load_number: #{@load_number.inspect},"\
137
+ " pro_number: #{@pro_number.inspect}, ship_date: #{@ship_date.inspect}, status:"\
138
+ " #{@status.inspect}, additional_properties: #{@additional_properties}>"
139
+ end
140
+ end
141
+ end
@@ -1,110 +1,97 @@
1
- # tql_otr_factoring_data_exchange
2
- #
3
- # This file was automatically generated by
4
- # APIMATIC v3.0 ( https://www.apimatic.io ).
5
-
6
- module TqlOtrFactoringDataExchange
7
- # TQL load details associated with this invoice.
8
- class Load < BaseModel
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # The TQL load number.
13
- # @return [String]
14
- attr_accessor :load_number
15
-
16
- # Current status of the underlying TQL load.
17
- # @return [String]
18
- attr_accessor :status
19
-
20
- # Date the load was picked up.
21
- # @return [Date]
22
- attr_accessor :pickup_date
23
-
24
- # Date the load was delivered.
25
- # @return [Date]
26
- attr_accessor :delivery_date
27
-
28
- # A mapping from model property names to API property names.
29
- def self.names
30
- @_hash = {} if @_hash.nil?
31
- @_hash['load_number'] = 'loadNumber'
32
- @_hash['status'] = 'status'
33
- @_hash['pickup_date'] = 'pickupDate'
34
- @_hash['delivery_date'] = 'deliveryDate'
35
- @_hash
36
- end
37
-
38
- # An array for optional fields
39
- def self.optionals
40
- %w[
41
- load_number
42
- status
43
- pickup_date
44
- delivery_date
45
- ]
46
- end
47
-
48
- # An array for nullable fields
49
- def self.nullables
50
- %w[
51
- status
52
- pickup_date
53
- delivery_date
54
- ]
55
- end
56
-
57
- def initialize(load_number: SKIP, status: SKIP, pickup_date: SKIP,
58
- delivery_date: SKIP, additional_properties: nil)
59
- # Add additional model properties to the instance
60
- additional_properties = {} if additional_properties.nil?
61
-
62
- @load_number = load_number unless load_number == SKIP
63
- @status = status unless status == SKIP
64
- @pickup_date = pickup_date unless pickup_date == SKIP
65
- @delivery_date = delivery_date unless delivery_date == SKIP
66
- @additional_properties = additional_properties
67
- end
68
-
69
- # Creates an instance of the object from a hash.
70
- def self.from_hash(hash)
71
- return nil unless hash
72
-
73
- # Extract variables from the hash.
74
- load_number = hash.key?('loadNumber') ? hash['loadNumber'] : SKIP
75
- status = hash.key?('status') ? hash['status'] : SKIP
76
- pickup_date = hash.key?('pickupDate') ? hash['pickupDate'] : SKIP
77
- delivery_date = hash.key?('deliveryDate') ? hash['deliveryDate'] : SKIP
78
-
79
- # Create a new hash for additional properties, removing known properties.
80
- new_hash = hash.reject { |k, _| names.value?(k) }
81
-
82
- additional_properties = APIHelper.get_additional_properties(
83
- new_hash, proc { |value| value }
84
- )
85
-
86
- # Create object from extracted values.
87
- Load.new(load_number: load_number,
88
- status: status,
89
- pickup_date: pickup_date,
90
- delivery_date: delivery_date,
91
- additional_properties: additional_properties)
92
- end
93
-
94
- # Provides a human-readable string representation of the object.
95
- def to_s
96
- class_name = self.class.name.split('::').last
97
- "<#{class_name} load_number: #{@load_number}, status: #{@status}, pickup_date:"\
98
- " #{@pickup_date}, delivery_date: #{@delivery_date}, additional_properties:"\
99
- " #{@additional_properties}>"
100
- end
101
-
102
- # Provides a debugging-friendly string with detailed object information.
103
- def inspect
104
- class_name = self.class.name.split('::').last
105
- "<#{class_name} load_number: #{@load_number.inspect}, status: #{@status.inspect},"\
106
- " pickup_date: #{@pickup_date.inspect}, delivery_date: #{@delivery_date.inspect},"\
107
- " additional_properties: #{@additional_properties}>"
108
- end
109
- end
110
- 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
+ # LoadSlim Model.
8
+ class LoadSlim < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Date]
14
+ attr_accessor :delivery_date
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :load_number
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Date]
22
+ attr_accessor :pickup_date
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [String]
26
+ attr_accessor :status
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['delivery_date'] = 'deliveryDate'
32
+ @_hash['load_number'] = 'loadNumber'
33
+ @_hash['pickup_date'] = 'pickupDate'
34
+ @_hash['status'] = 'status'
35
+ @_hash
36
+ end
37
+
38
+ # An array for optional fields
39
+ def self.optionals
40
+ %w[
41
+ delivery_date
42
+ load_number
43
+ pickup_date
44
+ status
45
+ ]
46
+ end
47
+
48
+ # An array for nullable fields
49
+ def self.nullables
50
+ %w[
51
+ delivery_date
52
+ pickup_date
53
+ status
54
+ ]
55
+ end
56
+
57
+ def initialize(delivery_date: SKIP, load_number: SKIP, pickup_date: SKIP,
58
+ status: SKIP)
59
+ @delivery_date = delivery_date unless delivery_date == SKIP
60
+ @load_number = load_number unless load_number == SKIP
61
+ @pickup_date = pickup_date unless pickup_date == SKIP
62
+ @status = status unless status == SKIP
63
+ end
64
+
65
+ # Creates an instance of the object from a hash.
66
+ def self.from_hash(hash)
67
+ return nil unless hash
68
+
69
+ # Extract variables from the hash.
70
+ delivery_date = hash.key?('deliveryDate') ? hash['deliveryDate'] : SKIP
71
+ load_number = hash.key?('loadNumber') ? hash['loadNumber'] : SKIP
72
+ pickup_date = hash.key?('pickupDate') ? hash['pickupDate'] : SKIP
73
+ status = hash.key?('status') ? hash['status'] : SKIP
74
+
75
+ # Create object from extracted values.
76
+ LoadSlim.new(delivery_date: delivery_date,
77
+ load_number: load_number,
78
+ pickup_date: pickup_date,
79
+ status: status)
80
+ end
81
+
82
+ # Provides a human-readable string representation of the object.
83
+ def to_s
84
+ class_name = self.class.name.split('::').last
85
+ "<#{class_name} delivery_date: #{@delivery_date}, load_number: #{@load_number},"\
86
+ " pickup_date: #{@pickup_date}, status: #{@status}>"
87
+ end
88
+
89
+ # Provides a debugging-friendly string with detailed object information.
90
+ def inspect
91
+ class_name = self.class.name.split('::').last
92
+ "<#{class_name} delivery_date: #{@delivery_date.inspect}, load_number:"\
93
+ " #{@load_number.inspect}, pickup_date: #{@pickup_date.inspect}, status:"\
94
+ " #{@status.inspect}>"
95
+ end
96
+ end
97
+ end
@@ -0,0 +1,116 @@
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
+ # NavixRateCharge Model.
8
+ class NavixRateCharge < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :code
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :description
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Float]
22
+ attr_accessor :amount
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [Float]
26
+ attr_accessor :rate
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [Float]
30
+ attr_accessor :quantity
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [RatingChargeQualifier]
34
+ attr_accessor :qualifier
35
+
36
+ # A mapping from model property names to API property names.
37
+ def self.names
38
+ @_hash = {} if @_hash.nil?
39
+ @_hash['code'] = 'Code'
40
+ @_hash['description'] = 'Description'
41
+ @_hash['amount'] = 'Amount'
42
+ @_hash['rate'] = 'Rate'
43
+ @_hash['quantity'] = 'Quantity'
44
+ @_hash['qualifier'] = 'Qualifier'
45
+ @_hash
46
+ end
47
+
48
+ # An array for optional fields
49
+ def self.optionals
50
+ %w[
51
+ code
52
+ description
53
+ amount
54
+ rate
55
+ quantity
56
+ qualifier
57
+ ]
58
+ end
59
+
60
+ # An array for nullable fields
61
+ def self.nullables
62
+ %w[
63
+ description
64
+ rate
65
+ quantity
66
+ qualifier
67
+ ]
68
+ end
69
+
70
+ def initialize(code: SKIP, description: SKIP, amount: SKIP, rate: SKIP,
71
+ quantity: SKIP, qualifier: SKIP)
72
+ @code = code unless code == SKIP
73
+ @description = description unless description == SKIP
74
+ @amount = amount unless amount == SKIP
75
+ @rate = rate unless rate == SKIP
76
+ @quantity = quantity unless quantity == SKIP
77
+ @qualifier = qualifier unless qualifier == SKIP
78
+ end
79
+
80
+ # Creates an instance of the object from a hash.
81
+ def self.from_hash(hash)
82
+ return nil unless hash
83
+
84
+ # Extract variables from the hash.
85
+ code = hash.key?('Code') ? hash['Code'] : SKIP
86
+ description = hash.key?('Description') ? hash['Description'] : SKIP
87
+ amount = hash.key?('Amount') ? hash['Amount'] : SKIP
88
+ rate = hash.key?('Rate') ? hash['Rate'] : SKIP
89
+ quantity = hash.key?('Quantity') ? hash['Quantity'] : SKIP
90
+ qualifier = hash.key?('Qualifier') ? hash['Qualifier'] : SKIP
91
+
92
+ # Create object from extracted values.
93
+ NavixRateCharge.new(code: code,
94
+ description: description,
95
+ amount: amount,
96
+ rate: rate,
97
+ quantity: quantity,
98
+ qualifier: qualifier)
99
+ end
100
+
101
+ # Provides a human-readable string representation of the object.
102
+ def to_s
103
+ class_name = self.class.name.split('::').last
104
+ "<#{class_name} code: #{@code}, description: #{@description}, amount: #{@amount}, rate:"\
105
+ " #{@rate}, quantity: #{@quantity}, qualifier: #{@qualifier}>"
106
+ end
107
+
108
+ # Provides a debugging-friendly string with detailed object information.
109
+ def inspect
110
+ class_name = self.class.name.split('::').last
111
+ "<#{class_name} code: #{@code.inspect}, description: #{@description.inspect}, amount:"\
112
+ " #{@amount.inspect}, rate: #{@rate.inspect}, quantity: #{@quantity.inspect}, qualifier:"\
113
+ " #{@qualifier.inspect}>"
114
+ end
115
+ end
116
+ end