tachain-sdk 0.1.0 → 0.1.1
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 -60
- data/lib/tachain-sdk/api/api_declaration_api.rb +155 -84
- data/lib/tachain-sdk/api/api_declaration_upload_api.rb +103 -0
- data/lib/tachain-sdk/api/api_delivery_api.rb +218 -138
- data/lib/tachain-sdk/api/api_enum_api.rb +2 -2
- data/lib/tachain-sdk/api/api_material_api.rb +414 -0
- data/lib/tachain-sdk/api/api_order_api.rb +185 -167
- data/lib/tachain-sdk/api/api_order_workflow_api.rb +227 -24
- data/lib/tachain-sdk/api/api_process_route_api.rb +414 -0
- data/lib/tachain-sdk/api/api_product_api.rb +414 -0
- data/lib/tachain-sdk/api/api_production_api.rb +141 -136
- data/lib/tachain-sdk/api/api_reference_api.rb +192 -0
- data/lib/tachain-sdk/models/{product_bom_grouping_dto.rb → api_bom_line_request.rb} +82 -107
- data/lib/tachain-sdk/models/api_bom_line_response.rb +205 -0
- data/lib/tachain-sdk/models/api_catalog_delete_request.rb +191 -0
- data/lib/tachain-sdk/models/{stage_attachment_api_dto.rb → api_declaration_attachment_response.rb} +16 -108
- data/lib/tachain-sdk/models/api_declaration_delete_request.rb +127 -17
- data/lib/tachain-sdk/models/api_declaration_document_request.rb +5 -27
- data/lib/tachain-sdk/models/api_declaration_file_request.rb +172 -0
- data/lib/tachain-sdk/models/api_declaration_form_request.rb +177 -0
- data/lib/tachain-sdk/models/{order_stage_form_datum_api_dto.rb → api_declaration_form_response.rb} +16 -49
- data/lib/tachain-sdk/models/api_declaration_list_response.rb +185 -0
- data/lib/tachain-sdk/models/api_declaration_submit_request.rb +171 -20
- data/lib/tachain-sdk/models/{api_declaration_submit_result_dto.rb → api_declaration_submit_response.rb} +10 -42
- data/lib/tachain-sdk/models/api_delivery_create_request.rb +292 -0
- data/lib/tachain-sdk/models/{result_brand_report_unlinked_order_detail.rb → api_delivery_delete_request.rb} +84 -60
- data/lib/tachain-sdk/models/api_delivery_detail_create_request.rb +353 -0
- data/lib/tachain-sdk/models/{delivery_note_detail_api_dto.rb → api_delivery_detail_response.rb} +23 -82
- data/lib/tachain-sdk/models/api_delivery_detail_update_request.rb +358 -0
- data/lib/tachain-sdk/models/{delivery_note_api_dto.rb → api_delivery_response.rb} +22 -192
- data/lib/tachain-sdk/models/api_delivery_update_request.rb +287 -0
- data/lib/tachain-sdk/models/{order_stage_form_dto.rb → api_document_form_response.rb} +16 -65
- data/lib/tachain-sdk/models/{document_type_api_dto.rb → api_document_type_response.rb} +30 -125
- data/lib/tachain-sdk/models/api_enum_value_response.rb +193 -0
- data/lib/tachain-sdk/models/{api_response_string.rb → api_error_response.rb} +22 -34
- data/lib/tachain-sdk/models/api_fiber_composition_request.rb +193 -0
- data/lib/tachain-sdk/models/api_fiber_composition_response.rb +160 -0
- data/lib/tachain-sdk/models/{attachment_in_api_dto.rb → api_file_response.rb} +23 -115
- data/lib/tachain-sdk/models/api_file_upload_response.rb +150 -0
- data/lib/tachain-sdk/models/api_mapping_response.rb +182 -0
- data/lib/tachain-sdk/models/api_material_create_request.rb +556 -0
- data/lib/tachain-sdk/models/api_material_response.rb +349 -0
- data/lib/tachain-sdk/models/api_material_update_request.rb +582 -0
- data/lib/tachain-sdk/models/{result_mapping_order_select.rb → api_order_accept_request.rb} +105 -70
- data/lib/tachain-sdk/models/api_order_confirm_receipt_request.rb +106 -29
- data/lib/tachain-sdk/models/api_order_create_request.rb +379 -0
- data/lib/tachain-sdk/models/api_order_declaration_verification_request.rb +293 -0
- data/lib/tachain-sdk/models/api_order_declaration_verification_response.rb +203 -0
- data/lib/tachain-sdk/models/api_order_delete_line_request.rb +315 -0
- data/lib/tachain-sdk/models/api_order_delete_request.rb +315 -0
- data/lib/tachain-sdk/models/api_order_line_create_request.rb +445 -0
- data/lib/tachain-sdk/models/{order_line_api_dto.rb → api_order_line_response.rb} +39 -330
- data/lib/tachain-sdk/models/api_order_line_update_request.rb +416 -0
- data/lib/tachain-sdk/models/api_order_receipt_pending_line_response.rb +171 -0
- data/lib/tachain-sdk/models/{microsoft_asp_net_core_mvc_problem_details.rb → api_order_receipt_pending_response.rb} +28 -45
- data/lib/tachain-sdk/models/api_order_receipt_result.rb +185 -0
- data/lib/tachain-sdk/models/{order_api_dto.rb → api_order_response.rb} +35 -291
- data/lib/tachain-sdk/models/api_order_submit_audit_request.rb +102 -42
- data/lib/tachain-sdk/models/api_order_submit_audit_response.rb +196 -0
- data/lib/tachain-sdk/models/api_order_update_request.rb +408 -0
- data/lib/tachain-sdk/models/api_page_result1_api_delivery_response.rb +220 -0
- data/lib/tachain-sdk/models/api_page_result1_api_material_response.rb +220 -0
- data/lib/tachain-sdk/models/api_page_result1_api_order_response.rb +220 -0
- data/lib/tachain-sdk/models/api_page_result1_api_process_route_response.rb +220 -0
- data/lib/tachain-sdk/models/{api_response_api_declaration_list_dto.rb → api_page_result1_api_product_response.rb} +48 -27
- data/lib/tachain-sdk/models/api_page_result1_api_production_response.rb +220 -0
- data/lib/tachain-sdk/models/{result_api_enum.rb → api_process_route_create_request.rb} +88 -62
- data/lib/tachain-sdk/models/api_process_route_response.rb +237 -0
- data/lib/tachain-sdk/models/{paged_response_delivery_note_api_dto.rb → api_process_route_update_request.rb} +102 -91
- data/lib/tachain-sdk/models/api_process_step_request.rb +201 -0
- data/lib/tachain-sdk/models/api_process_step_response.rb +171 -0
- data/lib/tachain-sdk/models/api_product_create_request.rb +595 -0
- data/lib/tachain-sdk/models/api_product_response.rb +373 -0
- data/lib/tachain-sdk/models/api_product_update_request.rb +621 -0
- data/lib/tachain-sdk/models/api_production_create_request.rb +381 -0
- data/lib/tachain-sdk/models/{api_integration_delete_request.rb → api_production_delete_request.rb} +22 -11
- data/lib/tachain-sdk/models/api_production_raw_material_create_request.rb +320 -0
- data/lib/tachain-sdk/models/{production_raw_material_api_dto.rb → api_production_raw_material_response.rb} +18 -118
- data/lib/tachain-sdk/models/api_production_raw_material_update_request.rb +325 -0
- data/lib/tachain-sdk/models/{production_api_dto.rb → api_production_response.rb} +23 -156
- data/lib/tachain-sdk/models/api_production_sales_order_create_request.rb +309 -0
- data/lib/tachain-sdk/models/{production_sales_order_api_dto.rb → api_production_sales_order_response.rb} +17 -94
- data/lib/tachain-sdk/models/api_production_sales_order_update_request.rb +314 -0
- data/lib/tachain-sdk/models/api_production_update_request.rb +392 -0
- data/lib/tachain-sdk/models/api_receipt_pending_item_response.rb +207 -0
- data/lib/tachain-sdk/models/api_reference_page_response1_api_enum_value_response.rb +162 -0
- data/lib/tachain-sdk/models/api_reference_page_response1_api_mapping_response.rb +162 -0
- data/lib/tachain-sdk/models/{api_response_production_api_dto.rb → api_result1_api_declaration_list_response.rb} +20 -33
- data/lib/tachain-sdk/models/api_result1_api_declaration_submit_response.rb +186 -0
- data/lib/tachain-sdk/models/{api_response_delivery_note_api_dto.rb → api_result1_api_delivery_response.rb} +20 -33
- data/lib/tachain-sdk/models/api_result1_api_file_upload_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_material_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_order_declaration_verification_response.rb +186 -0
- data/lib/tachain-sdk/models/{api_response_api_declaration_submit_result_dto.rb → api_result1_api_order_receipt_pending_response.rb} +20 -33
- data/lib/tachain-sdk/models/api_result1_api_order_receipt_result.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_order_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_order_submit_audit_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_process_route_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_product_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_production_response.rb +186 -0
- data/lib/tachain-sdk/models/{api_response_order_api_dto.rb → api_result1_string.rb} +22 -33
- data/lib/tachain-sdk/models/{attachment_in_api_create_dto.rb → api_verification_file_response.rb} +106 -84
- data/lib/tachain-sdk/models/api_verification_response.rb +218 -0
- data/lib/tachain-sdk/models/delete_v1_declaration_delete200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_declaration_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_declaration_required_documents200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_delivery_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_enum_get_list200_response.rb +73 -171
- data/lib/tachain-sdk/models/get_v1_material_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_order_po_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_order_receipt_pending200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_process_route_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_product_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_production_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_reference_enum_values200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_reference_mappings200_response.rb +103 -0
- data/lib/tachain-sdk/models/model1.rb +47 -14
- data/lib/tachain-sdk/models/model2.rb +190 -0
- data/lib/tachain-sdk/models/model3.rb +17 -33
- data/lib/tachain-sdk/models/model4.rb +17 -33
- data/lib/tachain-sdk/models/post_v1_declaration_submit200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_declaration_upload_file200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_material_create200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_order_create200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_order_declaration_verification200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_order_submit_audit200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_process_route_create200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_product_create200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_production_create200_response.rb +103 -0
- data/lib/tachain-sdk/models/put_v1_delivery_confirm_receipt200_response.rb +103 -0
- data/lib/tachain-sdk/models/put_v1_delivery_return_receipt200_response.rb +103 -0
- data/lib/tachain-sdk/models/put_v1_order_confirm_receipt200_response.rb +103 -0
- data/lib/tachain-sdk/version.rb +1 -1
- data/lib/tachain-sdk.rb +116 -51
- metadata +118 -53
- data/lib/tachain-sdk/models/api_declaration_list_dto.rb +0 -251
- data/lib/tachain-sdk/models/brand_kpi_policy_result.rb +0 -334
- data/lib/tachain-sdk/models/brand_order_kpi_snapshot_dto.rb +0 -880
- data/lib/tachain-sdk/models/brand_order_supplier_order_snapshot_dto.rb +0 -749
- data/lib/tachain-sdk/models/brand_order_uncompleted_declare_snapshot_dto.rb +0 -513
- data/lib/tachain-sdk/models/company.rb +0 -780
- data/lib/tachain-sdk/models/company_compliance_profile.rb +0 -547
- data/lib/tachain-sdk/models/company_utility_declaration.rb +0 -592
- data/lib/tachain-sdk/models/customer.rb +0 -569
- data/lib/tachain-sdk/models/factory.rb +0 -545
- data/lib/tachain-sdk/models/order.rb +0 -974
- data/lib/tachain-sdk/models/order_line.rb +0 -1184
- data/lib/tachain-sdk/models/order_stage_form_api_dto.rb +0 -270
- data/lib/tachain-sdk/models/paged_response_order_api_dto.rb +0 -296
- data/lib/tachain-sdk/models/paged_response_production_api_dto.rb +0 -296
- data/lib/tachain-sdk/models/production_raw_material_dto.rb +0 -548
- data/lib/tachain-sdk/models/result_brand_report_allocated_delivery_kpi_detail.rb +0 -331
- data/lib/tachain-sdk/models/result_kpi_archived_data_change_detail.rb +0 -418
- data/lib/tachain-sdk/models/result_order_trace_report.rb +0 -721
- data/lib/tachain-sdk/models/supplier.rb +0 -585
- data/lib/tachain-sdk/models/supplier_onboarding_ext.rb +0 -383
- data/lib/tachain-sdk/models/template_dto_business_risk_warn_info_dto.rb +0 -456
- data/lib/tachain-sdk/models/template_dto_multi_so_line_complete_status.rb +0 -227
- data/lib/tachain-sdk/models/trader.rb +0 -506
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Tactic Chain Public API
|
|
3
|
+
|
|
4
|
+
#Public integration endpoints. Set your own base URL and credential before calling.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module TachainSdk
|
|
17
|
+
# 修改专用集成请求;只接收本操作使用的业务字段。
|
|
18
|
+
class ApiDeliveryDetailUpdateRequest < ApiModelBase
|
|
19
|
+
# 修改/删除时可使用查询返回的内部 ID;必须属于当前单据,保留原有 ID 调用方式。
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# 订单明细ID
|
|
23
|
+
attr_accessor :order_line_id
|
|
24
|
+
|
|
25
|
+
# 运输数量 条件:非删除明细时需填写相应业务数据;删除时可省略。
|
|
26
|
+
attr_accessor :quantity
|
|
27
|
+
|
|
28
|
+
# 毛重
|
|
29
|
+
attr_accessor :gross_weight
|
|
30
|
+
|
|
31
|
+
# 净重
|
|
32
|
+
attr_accessor :net_weight
|
|
33
|
+
|
|
34
|
+
# 认证重量
|
|
35
|
+
attr_accessor :certification_weight
|
|
36
|
+
|
|
37
|
+
# TC交易证书编号
|
|
38
|
+
attr_accessor :tc_number
|
|
39
|
+
|
|
40
|
+
# 订单编号。外部发货接口可用 OrderNumber + OrderDate + LineNumber 定位订单明细。
|
|
41
|
+
attr_accessor :order_number
|
|
42
|
+
|
|
43
|
+
# 订单日期。外部发货接口按订单业务键解析订单明细时使用。
|
|
44
|
+
attr_accessor :order_date
|
|
45
|
+
|
|
46
|
+
# 订单行号。需要配合 OrderNumber 和 OrderDate 一起定位订单明细。
|
|
47
|
+
attr_accessor :line_number
|
|
48
|
+
|
|
49
|
+
# 删除此关联明细;默认 false。仍需按订单业务键校验归属。
|
|
50
|
+
attr_accessor :delete
|
|
51
|
+
|
|
52
|
+
# 查询返回的客户公司 ID,可选。优先使用 CustomerName 或 CustomerCode。
|
|
53
|
+
attr_accessor :customer_id
|
|
54
|
+
|
|
55
|
+
# 客户英文名、当地语言名称或简称,精确匹配当前公司的有效客户关系。
|
|
56
|
+
attr_accessor :customer_name
|
|
57
|
+
|
|
58
|
+
# 当前公司维护的客户编码或启用的 Customer/Company 外部映射值。 条件:外部流水号或单号重复时用于消歧;多个客户字段必须一致。
|
|
59
|
+
attr_accessor :customer_code
|
|
60
|
+
|
|
61
|
+
# 查询返回的供应商公司 ID,可选。优先使用 SupplierName 或 SupplierCode。
|
|
62
|
+
attr_accessor :supplier_id
|
|
63
|
+
|
|
64
|
+
# 供应商英文名、当地语言名称或简称,精确匹配当前公司的有效供应商关系。
|
|
65
|
+
attr_accessor :supplier_name
|
|
66
|
+
|
|
67
|
+
# 当前公司维护的供应商编码或启用的 Supplier/Company 外部映射值。 条件:外部流水号或单号重复时用于消歧;多个供应商字段必须一致。
|
|
68
|
+
attr_accessor :supplier_code
|
|
69
|
+
|
|
70
|
+
# 买方外部系统的订单明细流水号;重复时补充交易对方和订单条件。
|
|
71
|
+
attr_accessor :customer_ext_no
|
|
72
|
+
|
|
73
|
+
# 卖方外部系统的订单明细流水号;重复时补充交易对方和订单条件。
|
|
74
|
+
attr_accessor :supplier_ext_no
|
|
75
|
+
|
|
76
|
+
# 查询返回的系统订单明细唯一流水号。
|
|
77
|
+
attr_accessor :unique_no
|
|
78
|
+
|
|
79
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
80
|
+
def self.attribute_map
|
|
81
|
+
{
|
|
82
|
+
:'id' => :'id',
|
|
83
|
+
:'order_line_id' => :'orderLineId',
|
|
84
|
+
:'quantity' => :'quantity',
|
|
85
|
+
:'gross_weight' => :'grossWeight',
|
|
86
|
+
:'net_weight' => :'netWeight',
|
|
87
|
+
:'certification_weight' => :'certificationWeight',
|
|
88
|
+
:'tc_number' => :'tcNumber',
|
|
89
|
+
:'order_number' => :'orderNumber',
|
|
90
|
+
:'order_date' => :'orderDate',
|
|
91
|
+
:'line_number' => :'lineNumber',
|
|
92
|
+
:'delete' => :'delete',
|
|
93
|
+
:'customer_id' => :'customerId',
|
|
94
|
+
:'customer_name' => :'customerName',
|
|
95
|
+
:'customer_code' => :'customerCode',
|
|
96
|
+
:'supplier_id' => :'supplierId',
|
|
97
|
+
:'supplier_name' => :'supplierName',
|
|
98
|
+
:'supplier_code' => :'supplierCode',
|
|
99
|
+
:'customer_ext_no' => :'customerExtNo',
|
|
100
|
+
:'supplier_ext_no' => :'supplierExtNo',
|
|
101
|
+
:'unique_no' => :'uniqueNo'
|
|
102
|
+
}
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Returns attribute mapping this model knows about
|
|
106
|
+
def self.acceptable_attribute_map
|
|
107
|
+
attribute_map
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Returns all the JSON keys this model knows about
|
|
111
|
+
def self.acceptable_attributes
|
|
112
|
+
acceptable_attribute_map.values
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Attribute type mapping.
|
|
116
|
+
def self.openapi_types
|
|
117
|
+
{
|
|
118
|
+
:'id' => :'Integer',
|
|
119
|
+
:'order_line_id' => :'String',
|
|
120
|
+
:'quantity' => :'Float',
|
|
121
|
+
:'gross_weight' => :'Float',
|
|
122
|
+
:'net_weight' => :'Float',
|
|
123
|
+
:'certification_weight' => :'Float',
|
|
124
|
+
:'tc_number' => :'String',
|
|
125
|
+
:'order_number' => :'String',
|
|
126
|
+
:'order_date' => :'Time',
|
|
127
|
+
:'line_number' => :'String',
|
|
128
|
+
:'delete' => :'Boolean',
|
|
129
|
+
:'customer_id' => :'String',
|
|
130
|
+
:'customer_name' => :'String',
|
|
131
|
+
:'customer_code' => :'String',
|
|
132
|
+
:'supplier_id' => :'String',
|
|
133
|
+
:'supplier_name' => :'String',
|
|
134
|
+
:'supplier_code' => :'String',
|
|
135
|
+
:'customer_ext_no' => :'String',
|
|
136
|
+
:'supplier_ext_no' => :'String',
|
|
137
|
+
:'unique_no' => :'String'
|
|
138
|
+
}
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# List of attributes with nullable: true
|
|
142
|
+
def self.openapi_nullable
|
|
143
|
+
Set.new([
|
|
144
|
+
:'id',
|
|
145
|
+
:'order_line_id',
|
|
146
|
+
:'quantity',
|
|
147
|
+
:'gross_weight',
|
|
148
|
+
:'net_weight',
|
|
149
|
+
:'certification_weight',
|
|
150
|
+
:'tc_number',
|
|
151
|
+
:'order_number',
|
|
152
|
+
:'order_date',
|
|
153
|
+
:'line_number',
|
|
154
|
+
:'customer_id',
|
|
155
|
+
:'customer_name',
|
|
156
|
+
:'customer_code',
|
|
157
|
+
:'supplier_id',
|
|
158
|
+
:'supplier_name',
|
|
159
|
+
:'supplier_code',
|
|
160
|
+
:'customer_ext_no',
|
|
161
|
+
:'supplier_ext_no',
|
|
162
|
+
:'unique_no'
|
|
163
|
+
])
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Initializes the object
|
|
167
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
168
|
+
def initialize(attributes = {})
|
|
169
|
+
if (!attributes.is_a?(Hash))
|
|
170
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ApiDeliveryDetailUpdateRequest` initialize method"
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
174
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
175
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
176
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
177
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ApiDeliveryDetailUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
178
|
+
end
|
|
179
|
+
h[k.to_sym] = v
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if attributes.key?(:'id')
|
|
183
|
+
self.id = attributes[:'id']
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'order_line_id')
|
|
187
|
+
self.order_line_id = attributes[:'order_line_id']
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.key?(:'quantity')
|
|
191
|
+
self.quantity = attributes[:'quantity']
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if attributes.key?(:'gross_weight')
|
|
195
|
+
self.gross_weight = attributes[:'gross_weight']
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
if attributes.key?(:'net_weight')
|
|
199
|
+
self.net_weight = attributes[:'net_weight']
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if attributes.key?(:'certification_weight')
|
|
203
|
+
self.certification_weight = attributes[:'certification_weight']
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if attributes.key?(:'tc_number')
|
|
207
|
+
self.tc_number = attributes[:'tc_number']
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if attributes.key?(:'order_number')
|
|
211
|
+
self.order_number = attributes[:'order_number']
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
if attributes.key?(:'order_date')
|
|
215
|
+
self.order_date = attributes[:'order_date']
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
if attributes.key?(:'line_number')
|
|
219
|
+
self.line_number = attributes[:'line_number']
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
if attributes.key?(:'delete')
|
|
223
|
+
self.delete = attributes[:'delete']
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
if attributes.key?(:'customer_id')
|
|
227
|
+
self.customer_id = attributes[:'customer_id']
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if attributes.key?(:'customer_name')
|
|
231
|
+
self.customer_name = attributes[:'customer_name']
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
if attributes.key?(:'customer_code')
|
|
235
|
+
self.customer_code = attributes[:'customer_code']
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
if attributes.key?(:'supplier_id')
|
|
239
|
+
self.supplier_id = attributes[:'supplier_id']
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
if attributes.key?(:'supplier_name')
|
|
243
|
+
self.supplier_name = attributes[:'supplier_name']
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
if attributes.key?(:'supplier_code')
|
|
247
|
+
self.supplier_code = attributes[:'supplier_code']
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
if attributes.key?(:'customer_ext_no')
|
|
251
|
+
self.customer_ext_no = attributes[:'customer_ext_no']
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
if attributes.key?(:'supplier_ext_no')
|
|
255
|
+
self.supplier_ext_no = attributes[:'supplier_ext_no']
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
if attributes.key?(:'unique_no')
|
|
259
|
+
self.unique_no = attributes[:'unique_no']
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
264
|
+
# @return Array for valid properties with the reasons
|
|
265
|
+
def list_invalid_properties
|
|
266
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
267
|
+
invalid_properties = Array.new
|
|
268
|
+
invalid_properties
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Check to see if the all the properties in the model are valid
|
|
272
|
+
# @return true if the model is valid
|
|
273
|
+
def valid?
|
|
274
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
275
|
+
true
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Checks equality by comparing each attribute.
|
|
279
|
+
# @param [Object] Object to be compared
|
|
280
|
+
def ==(o)
|
|
281
|
+
return true if self.equal?(o)
|
|
282
|
+
self.class == o.class &&
|
|
283
|
+
id == o.id &&
|
|
284
|
+
order_line_id == o.order_line_id &&
|
|
285
|
+
quantity == o.quantity &&
|
|
286
|
+
gross_weight == o.gross_weight &&
|
|
287
|
+
net_weight == o.net_weight &&
|
|
288
|
+
certification_weight == o.certification_weight &&
|
|
289
|
+
tc_number == o.tc_number &&
|
|
290
|
+
order_number == o.order_number &&
|
|
291
|
+
order_date == o.order_date &&
|
|
292
|
+
line_number == o.line_number &&
|
|
293
|
+
delete == o.delete &&
|
|
294
|
+
customer_id == o.customer_id &&
|
|
295
|
+
customer_name == o.customer_name &&
|
|
296
|
+
customer_code == o.customer_code &&
|
|
297
|
+
supplier_id == o.supplier_id &&
|
|
298
|
+
supplier_name == o.supplier_name &&
|
|
299
|
+
supplier_code == o.supplier_code &&
|
|
300
|
+
customer_ext_no == o.customer_ext_no &&
|
|
301
|
+
supplier_ext_no == o.supplier_ext_no &&
|
|
302
|
+
unique_no == o.unique_no
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
# @see the `==` method
|
|
306
|
+
# @param [Object] Object to be compared
|
|
307
|
+
def eql?(o)
|
|
308
|
+
self == o
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
# Calculates hash code according to all attributes.
|
|
312
|
+
# @return [Integer] Hash code
|
|
313
|
+
def hash
|
|
314
|
+
[id, order_line_id, quantity, gross_weight, net_weight, certification_weight, tc_number, order_number, order_date, line_number, delete, customer_id, customer_name, customer_code, supplier_id, supplier_name, supplier_code, customer_ext_no, supplier_ext_no, unique_no].hash
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
# Builds the object from hash
|
|
318
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
319
|
+
# @return [Object] Returns the model itself
|
|
320
|
+
def self.build_from_hash(attributes)
|
|
321
|
+
return nil unless attributes.is_a?(Hash)
|
|
322
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
323
|
+
transformed_hash = {}
|
|
324
|
+
openapi_types.each_pair do |key, type|
|
|
325
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
326
|
+
transformed_hash["#{key}"] = nil
|
|
327
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
328
|
+
# check to ensure the input is an array given that the attribute
|
|
329
|
+
# is documented as an array but the input is not
|
|
330
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
331
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
332
|
+
end
|
|
333
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
334
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
335
|
+
end
|
|
336
|
+
end
|
|
337
|
+
new(transformed_hash)
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
# Returns the object in the form of hash
|
|
341
|
+
# @return [Hash] Returns the object in the form of hash
|
|
342
|
+
def to_hash
|
|
343
|
+
hash = {}
|
|
344
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
345
|
+
value = self.send(attr)
|
|
346
|
+
if value.nil?
|
|
347
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
348
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
hash[param] = _to_hash(value)
|
|
352
|
+
end
|
|
353
|
+
hash
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
end
|