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,445 @@
|
|
|
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 ApiOrderLineCreateRequest < ApiModelBase
|
|
19
|
+
# 行项目序号
|
|
20
|
+
attr_accessor :line_number
|
|
21
|
+
|
|
22
|
+
# 物料分类,取 MaterialChildScope.code,其 ParentCode 必须与订单 scopeCode 一致;已有原料可自动带出,缺失时必填。 条件:新增原料或已有资料缺少物料分类时必填;修改省略可沿用原值。
|
|
23
|
+
attr_accessor :product_category
|
|
24
|
+
|
|
25
|
+
# 原料编码
|
|
26
|
+
attr_accessor :material_code
|
|
27
|
+
|
|
28
|
+
# 原料名称 条件:创建新的原料编码时必填;已维护原料可回填。
|
|
29
|
+
attr_accessor :material_name
|
|
30
|
+
|
|
31
|
+
# 颜色
|
|
32
|
+
attr_accessor :color
|
|
33
|
+
|
|
34
|
+
# 物料批次号
|
|
35
|
+
attr_accessor :batch
|
|
36
|
+
|
|
37
|
+
# 采购数量,大于 0,最多 3 位小数;按 unit 的单位填写。
|
|
38
|
+
attr_accessor :quantity
|
|
39
|
+
|
|
40
|
+
# 目的国家 条件:当前采购公司为品牌商时必填。
|
|
41
|
+
attr_accessor :destination_country
|
|
42
|
+
|
|
43
|
+
# 物料成分 条件:T4 阶段必填;JSON 数组字符串,fiber 为 FiberType.code,ratio 大于 0 且不超过 100,最多 2 位小数,总和为 100,纤维不能重复。单纤维可传一项,省略 ratio 时按 100。其他阶段可省略。
|
|
44
|
+
attr_accessor :component
|
|
45
|
+
|
|
46
|
+
# 认证要求
|
|
47
|
+
attr_accessor :certification
|
|
48
|
+
|
|
49
|
+
# 采购数量的计量单位,支持单位编码或名称;允许使用与原料默认单位同组的有效可换算单位(如 kg 与 t)。quantity 按传入单位填写并保存,不修改原料默认单位。
|
|
50
|
+
attr_accessor :unit
|
|
51
|
+
|
|
52
|
+
# 客户外部系统流水号
|
|
53
|
+
attr_accessor :customer_ext_no
|
|
54
|
+
|
|
55
|
+
# 供应商外部系统流水号
|
|
56
|
+
attr_accessor :supplier_ext_no
|
|
57
|
+
|
|
58
|
+
# 备注
|
|
59
|
+
attr_accessor :remark
|
|
60
|
+
|
|
61
|
+
# 原产国编码;供应商为无需上线公司(type=1)时必填。 条件:供应商为无需上线公司(type=1)时必填;修改可沿用原值。
|
|
62
|
+
attr_accessor :origin_country
|
|
63
|
+
|
|
64
|
+
# 毛重
|
|
65
|
+
attr_accessor :gross_weight
|
|
66
|
+
|
|
67
|
+
# 净重
|
|
68
|
+
attr_accessor :net_weight
|
|
69
|
+
|
|
70
|
+
# 预计发货日期(ETD) 条件:采购行非 T4 阶段必填;T4 可省略。
|
|
71
|
+
attr_accessor :estimated_time_of_departure
|
|
72
|
+
|
|
73
|
+
# 季度
|
|
74
|
+
attr_accessor :season
|
|
75
|
+
|
|
76
|
+
# 年份
|
|
77
|
+
attr_accessor :season_year
|
|
78
|
+
|
|
79
|
+
# 单价
|
|
80
|
+
attr_accessor :unit_price
|
|
81
|
+
|
|
82
|
+
# 税率
|
|
83
|
+
attr_accessor :tax
|
|
84
|
+
|
|
85
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
86
|
+
def self.attribute_map
|
|
87
|
+
{
|
|
88
|
+
:'line_number' => :'lineNumber',
|
|
89
|
+
:'product_category' => :'productCategory',
|
|
90
|
+
:'material_code' => :'materialCode',
|
|
91
|
+
:'material_name' => :'materialName',
|
|
92
|
+
:'color' => :'color',
|
|
93
|
+
:'batch' => :'batch',
|
|
94
|
+
:'quantity' => :'quantity',
|
|
95
|
+
:'destination_country' => :'destinationCountry',
|
|
96
|
+
:'component' => :'component',
|
|
97
|
+
:'certification' => :'certification',
|
|
98
|
+
:'unit' => :'unit',
|
|
99
|
+
:'customer_ext_no' => :'customerExtNo',
|
|
100
|
+
:'supplier_ext_no' => :'supplierExtNo',
|
|
101
|
+
:'remark' => :'remark',
|
|
102
|
+
:'origin_country' => :'originCountry',
|
|
103
|
+
:'gross_weight' => :'grossWeight',
|
|
104
|
+
:'net_weight' => :'netWeight',
|
|
105
|
+
:'estimated_time_of_departure' => :'estimatedTimeOfDeparture',
|
|
106
|
+
:'season' => :'season',
|
|
107
|
+
:'season_year' => :'seasonYear',
|
|
108
|
+
:'unit_price' => :'unitPrice',
|
|
109
|
+
:'tax' => :'tax'
|
|
110
|
+
}
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Returns attribute mapping this model knows about
|
|
114
|
+
def self.acceptable_attribute_map
|
|
115
|
+
attribute_map
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Returns all the JSON keys this model knows about
|
|
119
|
+
def self.acceptable_attributes
|
|
120
|
+
acceptable_attribute_map.values
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Attribute type mapping.
|
|
124
|
+
def self.openapi_types
|
|
125
|
+
{
|
|
126
|
+
:'line_number' => :'String',
|
|
127
|
+
:'product_category' => :'String',
|
|
128
|
+
:'material_code' => :'String',
|
|
129
|
+
:'material_name' => :'String',
|
|
130
|
+
:'color' => :'String',
|
|
131
|
+
:'batch' => :'String',
|
|
132
|
+
:'quantity' => :'Float',
|
|
133
|
+
:'destination_country' => :'String',
|
|
134
|
+
:'component' => :'String',
|
|
135
|
+
:'certification' => :'String',
|
|
136
|
+
:'unit' => :'String',
|
|
137
|
+
:'customer_ext_no' => :'String',
|
|
138
|
+
:'supplier_ext_no' => :'String',
|
|
139
|
+
:'remark' => :'String',
|
|
140
|
+
:'origin_country' => :'String',
|
|
141
|
+
:'gross_weight' => :'Float',
|
|
142
|
+
:'net_weight' => :'Float',
|
|
143
|
+
:'estimated_time_of_departure' => :'Time',
|
|
144
|
+
:'season' => :'String',
|
|
145
|
+
:'season_year' => :'String',
|
|
146
|
+
:'unit_price' => :'Float',
|
|
147
|
+
:'tax' => :'Float'
|
|
148
|
+
}
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# List of attributes with nullable: true
|
|
152
|
+
def self.openapi_nullable
|
|
153
|
+
Set.new([
|
|
154
|
+
:'product_category',
|
|
155
|
+
:'material_name',
|
|
156
|
+
:'color',
|
|
157
|
+
:'batch',
|
|
158
|
+
:'destination_country',
|
|
159
|
+
:'component',
|
|
160
|
+
:'certification',
|
|
161
|
+
:'customer_ext_no',
|
|
162
|
+
:'supplier_ext_no',
|
|
163
|
+
:'remark',
|
|
164
|
+
:'origin_country',
|
|
165
|
+
:'gross_weight',
|
|
166
|
+
:'net_weight',
|
|
167
|
+
:'estimated_time_of_departure',
|
|
168
|
+
:'season',
|
|
169
|
+
:'season_year',
|
|
170
|
+
:'unit_price',
|
|
171
|
+
:'tax'
|
|
172
|
+
])
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Initializes the object
|
|
176
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
177
|
+
def initialize(attributes = {})
|
|
178
|
+
if (!attributes.is_a?(Hash))
|
|
179
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ApiOrderLineCreateRequest` initialize method"
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
183
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
184
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
185
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
186
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ApiOrderLineCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
187
|
+
end
|
|
188
|
+
h[k.to_sym] = v
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
if attributes.key?(:'line_number')
|
|
192
|
+
self.line_number = attributes[:'line_number']
|
|
193
|
+
else
|
|
194
|
+
self.line_number = nil
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
if attributes.key?(:'product_category')
|
|
198
|
+
self.product_category = attributes[:'product_category']
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
if attributes.key?(:'material_code')
|
|
202
|
+
self.material_code = attributes[:'material_code']
|
|
203
|
+
else
|
|
204
|
+
self.material_code = nil
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
if attributes.key?(:'material_name')
|
|
208
|
+
self.material_name = attributes[:'material_name']
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if attributes.key?(:'color')
|
|
212
|
+
self.color = attributes[:'color']
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
if attributes.key?(:'batch')
|
|
216
|
+
self.batch = attributes[:'batch']
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if attributes.key?(:'quantity')
|
|
220
|
+
self.quantity = attributes[:'quantity']
|
|
221
|
+
else
|
|
222
|
+
self.quantity = nil
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
if attributes.key?(:'destination_country')
|
|
226
|
+
self.destination_country = attributes[:'destination_country']
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
if attributes.key?(:'component')
|
|
230
|
+
self.component = attributes[:'component']
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
if attributes.key?(:'certification')
|
|
234
|
+
self.certification = attributes[:'certification']
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
if attributes.key?(:'unit')
|
|
238
|
+
self.unit = attributes[:'unit']
|
|
239
|
+
else
|
|
240
|
+
self.unit = nil
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if attributes.key?(:'customer_ext_no')
|
|
244
|
+
self.customer_ext_no = attributes[:'customer_ext_no']
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
if attributes.key?(:'supplier_ext_no')
|
|
248
|
+
self.supplier_ext_no = attributes[:'supplier_ext_no']
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
if attributes.key?(:'remark')
|
|
252
|
+
self.remark = attributes[:'remark']
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
if attributes.key?(:'origin_country')
|
|
256
|
+
self.origin_country = attributes[:'origin_country']
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
if attributes.key?(:'gross_weight')
|
|
260
|
+
self.gross_weight = attributes[:'gross_weight']
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
if attributes.key?(:'net_weight')
|
|
264
|
+
self.net_weight = attributes[:'net_weight']
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
if attributes.key?(:'estimated_time_of_departure')
|
|
268
|
+
self.estimated_time_of_departure = attributes[:'estimated_time_of_departure']
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
if attributes.key?(:'season')
|
|
272
|
+
self.season = attributes[:'season']
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
if attributes.key?(:'season_year')
|
|
276
|
+
self.season_year = attributes[:'season_year']
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
if attributes.key?(:'unit_price')
|
|
280
|
+
self.unit_price = attributes[:'unit_price']
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
if attributes.key?(:'tax')
|
|
284
|
+
self.tax = attributes[:'tax']
|
|
285
|
+
end
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
289
|
+
# @return Array for valid properties with the reasons
|
|
290
|
+
def list_invalid_properties
|
|
291
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
292
|
+
invalid_properties = Array.new
|
|
293
|
+
if @line_number.nil?
|
|
294
|
+
invalid_properties.push('invalid value for "line_number", line_number cannot be nil.')
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
if @material_code.nil?
|
|
298
|
+
invalid_properties.push('invalid value for "material_code", material_code cannot be nil.')
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
if @quantity.nil?
|
|
302
|
+
invalid_properties.push('invalid value for "quantity", quantity cannot be nil.')
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
if @unit.nil?
|
|
306
|
+
invalid_properties.push('invalid value for "unit", unit cannot be nil.')
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
invalid_properties
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
# Check to see if the all the properties in the model are valid
|
|
313
|
+
# @return true if the model is valid
|
|
314
|
+
def valid?
|
|
315
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
316
|
+
return false if @line_number.nil?
|
|
317
|
+
return false if @material_code.nil?
|
|
318
|
+
return false if @quantity.nil?
|
|
319
|
+
return false if @unit.nil?
|
|
320
|
+
true
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Custom attribute writer method with validation
|
|
324
|
+
# @param [Object] line_number Value to be assigned
|
|
325
|
+
def line_number=(line_number)
|
|
326
|
+
if line_number.nil?
|
|
327
|
+
fail ArgumentError, 'line_number cannot be nil'
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
@line_number = line_number
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
# Custom attribute writer method with validation
|
|
334
|
+
# @param [Object] material_code Value to be assigned
|
|
335
|
+
def material_code=(material_code)
|
|
336
|
+
if material_code.nil?
|
|
337
|
+
fail ArgumentError, 'material_code cannot be nil'
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
@material_code = material_code
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# Custom attribute writer method with validation
|
|
344
|
+
# @param [Object] quantity Value to be assigned
|
|
345
|
+
def quantity=(quantity)
|
|
346
|
+
if quantity.nil?
|
|
347
|
+
fail ArgumentError, 'quantity cannot be nil'
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
@quantity = quantity
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
# Custom attribute writer method with validation
|
|
354
|
+
# @param [Object] unit Value to be assigned
|
|
355
|
+
def unit=(unit)
|
|
356
|
+
if unit.nil?
|
|
357
|
+
fail ArgumentError, 'unit cannot be nil'
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
@unit = unit
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
# Checks equality by comparing each attribute.
|
|
364
|
+
# @param [Object] Object to be compared
|
|
365
|
+
def ==(o)
|
|
366
|
+
return true if self.equal?(o)
|
|
367
|
+
self.class == o.class &&
|
|
368
|
+
line_number == o.line_number &&
|
|
369
|
+
product_category == o.product_category &&
|
|
370
|
+
material_code == o.material_code &&
|
|
371
|
+
material_name == o.material_name &&
|
|
372
|
+
color == o.color &&
|
|
373
|
+
batch == o.batch &&
|
|
374
|
+
quantity == o.quantity &&
|
|
375
|
+
destination_country == o.destination_country &&
|
|
376
|
+
component == o.component &&
|
|
377
|
+
certification == o.certification &&
|
|
378
|
+
unit == o.unit &&
|
|
379
|
+
customer_ext_no == o.customer_ext_no &&
|
|
380
|
+
supplier_ext_no == o.supplier_ext_no &&
|
|
381
|
+
remark == o.remark &&
|
|
382
|
+
origin_country == o.origin_country &&
|
|
383
|
+
gross_weight == o.gross_weight &&
|
|
384
|
+
net_weight == o.net_weight &&
|
|
385
|
+
estimated_time_of_departure == o.estimated_time_of_departure &&
|
|
386
|
+
season == o.season &&
|
|
387
|
+
season_year == o.season_year &&
|
|
388
|
+
unit_price == o.unit_price &&
|
|
389
|
+
tax == o.tax
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
# @see the `==` method
|
|
393
|
+
# @param [Object] Object to be compared
|
|
394
|
+
def eql?(o)
|
|
395
|
+
self == o
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
# Calculates hash code according to all attributes.
|
|
399
|
+
# @return [Integer] Hash code
|
|
400
|
+
def hash
|
|
401
|
+
[line_number, product_category, material_code, material_name, color, batch, quantity, destination_country, component, certification, unit, customer_ext_no, supplier_ext_no, remark, origin_country, gross_weight, net_weight, estimated_time_of_departure, season, season_year, unit_price, tax].hash
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
# Builds the object from hash
|
|
405
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
406
|
+
# @return [Object] Returns the model itself
|
|
407
|
+
def self.build_from_hash(attributes)
|
|
408
|
+
return nil unless attributes.is_a?(Hash)
|
|
409
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
410
|
+
transformed_hash = {}
|
|
411
|
+
openapi_types.each_pair do |key, type|
|
|
412
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
413
|
+
transformed_hash["#{key}"] = nil
|
|
414
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
415
|
+
# check to ensure the input is an array given that the attribute
|
|
416
|
+
# is documented as an array but the input is not
|
|
417
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
418
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
419
|
+
end
|
|
420
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
421
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
422
|
+
end
|
|
423
|
+
end
|
|
424
|
+
new(transformed_hash)
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
# Returns the object in the form of hash
|
|
428
|
+
# @return [Hash] Returns the object in the form of hash
|
|
429
|
+
def to_hash
|
|
430
|
+
hash = {}
|
|
431
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
432
|
+
value = self.send(attr)
|
|
433
|
+
if value.nil?
|
|
434
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
435
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
hash[param] = _to_hash(value)
|
|
439
|
+
end
|
|
440
|
+
hash
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
end
|