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
|
@@ -1,548 +0,0 @@
|
|
|
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 ProductionRawMaterialDto < ApiModelBase
|
|
19
|
-
# 原料记录ID
|
|
20
|
-
attr_accessor :id
|
|
21
|
-
|
|
22
|
-
# 生产批次ID
|
|
23
|
-
attr_accessor :production_id
|
|
24
|
-
|
|
25
|
-
# 采购订单明细ID
|
|
26
|
-
attr_accessor :purchase_order_detail_id
|
|
27
|
-
|
|
28
|
-
# 原料名称(冗余)
|
|
29
|
-
attr_accessor :material_name
|
|
30
|
-
|
|
31
|
-
# 使用数量
|
|
32
|
-
attr_accessor :quantity_used
|
|
33
|
-
|
|
34
|
-
# 单位
|
|
35
|
-
attr_accessor :unit
|
|
36
|
-
|
|
37
|
-
# 租户ID
|
|
38
|
-
attr_accessor :tenant_id
|
|
39
|
-
|
|
40
|
-
# 环境类型:0正式,1测试
|
|
41
|
-
attr_accessor :environment_type
|
|
42
|
-
|
|
43
|
-
# 创建用户ID
|
|
44
|
-
attr_accessor :created_by
|
|
45
|
-
|
|
46
|
-
# 创建时间
|
|
47
|
-
attr_accessor :created_at
|
|
48
|
-
|
|
49
|
-
# 公司ID
|
|
50
|
-
attr_accessor :company_id
|
|
51
|
-
|
|
52
|
-
# 成品入库单ID,(MTS Only)
|
|
53
|
-
attr_accessor :receipt_id
|
|
54
|
-
|
|
55
|
-
# -9 禁用, -1 删除, 0 正常
|
|
56
|
-
attr_accessor :status
|
|
57
|
-
|
|
58
|
-
# 修改用户ID
|
|
59
|
-
attr_accessor :updated_by
|
|
60
|
-
|
|
61
|
-
# 更新时间
|
|
62
|
-
attr_accessor :updated_at
|
|
63
|
-
|
|
64
|
-
# 生产损耗率(%)
|
|
65
|
-
attr_accessor :loss
|
|
66
|
-
|
|
67
|
-
# 订单可用量
|
|
68
|
-
attr_accessor :available_quantity
|
|
69
|
-
|
|
70
|
-
# 单位名称
|
|
71
|
-
attr_accessor :u_name
|
|
72
|
-
|
|
73
|
-
# 订单编号
|
|
74
|
-
attr_accessor :order_number
|
|
75
|
-
|
|
76
|
-
# 订单行号
|
|
77
|
-
attr_accessor :line_number
|
|
78
|
-
|
|
79
|
-
# 订单唯一标识
|
|
80
|
-
attr_accessor :unique_no
|
|
81
|
-
|
|
82
|
-
# 原料编码
|
|
83
|
-
attr_accessor :material_code
|
|
84
|
-
|
|
85
|
-
# 关联采购订单行的阶段编码,用于快速申报领料回显和草稿保存。
|
|
86
|
-
attr_accessor :scope_code
|
|
87
|
-
|
|
88
|
-
# 关联采购订单行用于纤维申报匹配的代表成分编码。
|
|
89
|
-
attr_accessor :single_component
|
|
90
|
-
|
|
91
|
-
attr_accessor :parent_id
|
|
92
|
-
|
|
93
|
-
# 供应商名称
|
|
94
|
-
attr_accessor :supplier_name
|
|
95
|
-
|
|
96
|
-
# 采购附件列表(合同/发票/付款证明/宣誓书)
|
|
97
|
-
attr_accessor :attachments
|
|
98
|
-
|
|
99
|
-
# 采购单订单数量
|
|
100
|
-
attr_accessor :quantity
|
|
101
|
-
|
|
102
|
-
# 采购单单位
|
|
103
|
-
attr_accessor :po_unit
|
|
104
|
-
|
|
105
|
-
attr_accessor :po_status
|
|
106
|
-
|
|
107
|
-
attr_accessor :unit_code
|
|
108
|
-
|
|
109
|
-
# 前端使用
|
|
110
|
-
attr_accessor :u_id
|
|
111
|
-
|
|
112
|
-
attr_accessor :is_transfer
|
|
113
|
-
|
|
114
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
115
|
-
def self.attribute_map
|
|
116
|
-
{
|
|
117
|
-
:'id' => :'id',
|
|
118
|
-
:'production_id' => :'productionId',
|
|
119
|
-
:'purchase_order_detail_id' => :'purchaseOrderDetailId',
|
|
120
|
-
:'material_name' => :'materialName',
|
|
121
|
-
:'quantity_used' => :'quantityUsed',
|
|
122
|
-
:'unit' => :'unit',
|
|
123
|
-
:'tenant_id' => :'tenantId',
|
|
124
|
-
:'environment_type' => :'environmentType',
|
|
125
|
-
:'created_by' => :'createdBy',
|
|
126
|
-
:'created_at' => :'createdAt',
|
|
127
|
-
:'company_id' => :'companyId',
|
|
128
|
-
:'receipt_id' => :'receiptId',
|
|
129
|
-
:'status' => :'status',
|
|
130
|
-
:'updated_by' => :'updatedBy',
|
|
131
|
-
:'updated_at' => :'updatedAt',
|
|
132
|
-
:'loss' => :'loss',
|
|
133
|
-
:'available_quantity' => :'availableQuantity',
|
|
134
|
-
:'u_name' => :'uName',
|
|
135
|
-
:'order_number' => :'orderNumber',
|
|
136
|
-
:'line_number' => :'lineNumber',
|
|
137
|
-
:'unique_no' => :'uniqueNo',
|
|
138
|
-
:'material_code' => :'materialCode',
|
|
139
|
-
:'scope_code' => :'scopeCode',
|
|
140
|
-
:'single_component' => :'singleComponent',
|
|
141
|
-
:'parent_id' => :'parentId',
|
|
142
|
-
:'supplier_name' => :'supplierName',
|
|
143
|
-
:'attachments' => :'attachments',
|
|
144
|
-
:'quantity' => :'quantity',
|
|
145
|
-
:'po_unit' => :'poUnit',
|
|
146
|
-
:'po_status' => :'poStatus',
|
|
147
|
-
:'unit_code' => :'unitCode',
|
|
148
|
-
:'u_id' => :'uId',
|
|
149
|
-
:'is_transfer' => :'isTransfer'
|
|
150
|
-
}
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
# Returns attribute mapping this model knows about
|
|
154
|
-
def self.acceptable_attribute_map
|
|
155
|
-
attribute_map
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
# Returns all the JSON keys this model knows about
|
|
159
|
-
def self.acceptable_attributes
|
|
160
|
-
acceptable_attribute_map.values
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
# Attribute type mapping.
|
|
164
|
-
def self.openapi_types
|
|
165
|
-
{
|
|
166
|
-
:'id' => :'Integer',
|
|
167
|
-
:'production_id' => :'String',
|
|
168
|
-
:'purchase_order_detail_id' => :'String',
|
|
169
|
-
:'material_name' => :'String',
|
|
170
|
-
:'quantity_used' => :'Float',
|
|
171
|
-
:'unit' => :'String',
|
|
172
|
-
:'tenant_id' => :'String',
|
|
173
|
-
:'environment_type' => :'Integer',
|
|
174
|
-
:'created_by' => :'String',
|
|
175
|
-
:'created_at' => :'Time',
|
|
176
|
-
:'company_id' => :'String',
|
|
177
|
-
:'receipt_id' => :'Integer',
|
|
178
|
-
:'status' => :'Integer',
|
|
179
|
-
:'updated_by' => :'String',
|
|
180
|
-
:'updated_at' => :'Time',
|
|
181
|
-
:'loss' => :'Float',
|
|
182
|
-
:'available_quantity' => :'Float',
|
|
183
|
-
:'u_name' => :'String',
|
|
184
|
-
:'order_number' => :'String',
|
|
185
|
-
:'line_number' => :'String',
|
|
186
|
-
:'unique_no' => :'String',
|
|
187
|
-
:'material_code' => :'String',
|
|
188
|
-
:'scope_code' => :'String',
|
|
189
|
-
:'single_component' => :'String',
|
|
190
|
-
:'parent_id' => :'String',
|
|
191
|
-
:'supplier_name' => :'String',
|
|
192
|
-
:'attachments' => :'Array<Object>',
|
|
193
|
-
:'quantity' => :'Float',
|
|
194
|
-
:'po_unit' => :'String',
|
|
195
|
-
:'po_status' => :'Integer',
|
|
196
|
-
:'unit_code' => :'String',
|
|
197
|
-
:'u_id' => :'String',
|
|
198
|
-
:'is_transfer' => :'Integer'
|
|
199
|
-
}
|
|
200
|
-
end
|
|
201
|
-
|
|
202
|
-
# List of attributes with nullable: true
|
|
203
|
-
def self.openapi_nullable
|
|
204
|
-
Set.new([
|
|
205
|
-
:'production_id',
|
|
206
|
-
:'purchase_order_detail_id',
|
|
207
|
-
:'material_name',
|
|
208
|
-
:'unit',
|
|
209
|
-
:'tenant_id',
|
|
210
|
-
:'created_by',
|
|
211
|
-
:'created_at',
|
|
212
|
-
:'company_id',
|
|
213
|
-
:'receipt_id',
|
|
214
|
-
:'status',
|
|
215
|
-
:'updated_by',
|
|
216
|
-
:'updated_at',
|
|
217
|
-
:'loss',
|
|
218
|
-
:'available_quantity',
|
|
219
|
-
:'u_name',
|
|
220
|
-
:'order_number',
|
|
221
|
-
:'line_number',
|
|
222
|
-
:'unique_no',
|
|
223
|
-
:'material_code',
|
|
224
|
-
:'scope_code',
|
|
225
|
-
:'single_component',
|
|
226
|
-
:'parent_id',
|
|
227
|
-
:'supplier_name',
|
|
228
|
-
:'attachments',
|
|
229
|
-
:'quantity',
|
|
230
|
-
:'po_unit',
|
|
231
|
-
:'po_status',
|
|
232
|
-
:'unit_code',
|
|
233
|
-
:'u_id',
|
|
234
|
-
:'is_transfer'
|
|
235
|
-
])
|
|
236
|
-
end
|
|
237
|
-
|
|
238
|
-
# Initializes the object
|
|
239
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
240
|
-
def initialize(attributes = {})
|
|
241
|
-
if (!attributes.is_a?(Hash))
|
|
242
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ProductionRawMaterialDto` initialize method"
|
|
243
|
-
end
|
|
244
|
-
|
|
245
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
246
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
247
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
248
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
249
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ProductionRawMaterialDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
250
|
-
end
|
|
251
|
-
h[k.to_sym] = v
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
if attributes.key?(:'id')
|
|
255
|
-
self.id = attributes[:'id']
|
|
256
|
-
else
|
|
257
|
-
self.id = nil
|
|
258
|
-
end
|
|
259
|
-
|
|
260
|
-
if attributes.key?(:'production_id')
|
|
261
|
-
self.production_id = attributes[:'production_id']
|
|
262
|
-
end
|
|
263
|
-
|
|
264
|
-
if attributes.key?(:'purchase_order_detail_id')
|
|
265
|
-
self.purchase_order_detail_id = attributes[:'purchase_order_detail_id']
|
|
266
|
-
end
|
|
267
|
-
|
|
268
|
-
if attributes.key?(:'material_name')
|
|
269
|
-
self.material_name = attributes[:'material_name']
|
|
270
|
-
end
|
|
271
|
-
|
|
272
|
-
if attributes.key?(:'quantity_used')
|
|
273
|
-
self.quantity_used = attributes[:'quantity_used']
|
|
274
|
-
else
|
|
275
|
-
self.quantity_used = nil
|
|
276
|
-
end
|
|
277
|
-
|
|
278
|
-
if attributes.key?(:'unit')
|
|
279
|
-
self.unit = attributes[:'unit']
|
|
280
|
-
end
|
|
281
|
-
|
|
282
|
-
if attributes.key?(:'tenant_id')
|
|
283
|
-
self.tenant_id = attributes[:'tenant_id']
|
|
284
|
-
end
|
|
285
|
-
|
|
286
|
-
if attributes.key?(:'environment_type')
|
|
287
|
-
self.environment_type = attributes[:'environment_type']
|
|
288
|
-
else
|
|
289
|
-
self.environment_type = nil
|
|
290
|
-
end
|
|
291
|
-
|
|
292
|
-
if attributes.key?(:'created_by')
|
|
293
|
-
self.created_by = attributes[:'created_by']
|
|
294
|
-
end
|
|
295
|
-
|
|
296
|
-
if attributes.key?(:'created_at')
|
|
297
|
-
self.created_at = attributes[:'created_at']
|
|
298
|
-
end
|
|
299
|
-
|
|
300
|
-
if attributes.key?(:'company_id')
|
|
301
|
-
self.company_id = attributes[:'company_id']
|
|
302
|
-
end
|
|
303
|
-
|
|
304
|
-
if attributes.key?(:'receipt_id')
|
|
305
|
-
self.receipt_id = attributes[:'receipt_id']
|
|
306
|
-
end
|
|
307
|
-
|
|
308
|
-
if attributes.key?(:'status')
|
|
309
|
-
self.status = attributes[:'status']
|
|
310
|
-
end
|
|
311
|
-
|
|
312
|
-
if attributes.key?(:'updated_by')
|
|
313
|
-
self.updated_by = attributes[:'updated_by']
|
|
314
|
-
end
|
|
315
|
-
|
|
316
|
-
if attributes.key?(:'updated_at')
|
|
317
|
-
self.updated_at = attributes[:'updated_at']
|
|
318
|
-
end
|
|
319
|
-
|
|
320
|
-
if attributes.key?(:'loss')
|
|
321
|
-
self.loss = attributes[:'loss']
|
|
322
|
-
end
|
|
323
|
-
|
|
324
|
-
if attributes.key?(:'available_quantity')
|
|
325
|
-
self.available_quantity = attributes[:'available_quantity']
|
|
326
|
-
end
|
|
327
|
-
|
|
328
|
-
if attributes.key?(:'u_name')
|
|
329
|
-
self.u_name = attributes[:'u_name']
|
|
330
|
-
end
|
|
331
|
-
|
|
332
|
-
if attributes.key?(:'order_number')
|
|
333
|
-
self.order_number = attributes[:'order_number']
|
|
334
|
-
end
|
|
335
|
-
|
|
336
|
-
if attributes.key?(:'line_number')
|
|
337
|
-
self.line_number = attributes[:'line_number']
|
|
338
|
-
end
|
|
339
|
-
|
|
340
|
-
if attributes.key?(:'unique_no')
|
|
341
|
-
self.unique_no = attributes[:'unique_no']
|
|
342
|
-
end
|
|
343
|
-
|
|
344
|
-
if attributes.key?(:'material_code')
|
|
345
|
-
self.material_code = attributes[:'material_code']
|
|
346
|
-
end
|
|
347
|
-
|
|
348
|
-
if attributes.key?(:'scope_code')
|
|
349
|
-
self.scope_code = attributes[:'scope_code']
|
|
350
|
-
end
|
|
351
|
-
|
|
352
|
-
if attributes.key?(:'single_component')
|
|
353
|
-
self.single_component = attributes[:'single_component']
|
|
354
|
-
end
|
|
355
|
-
|
|
356
|
-
if attributes.key?(:'parent_id')
|
|
357
|
-
self.parent_id = attributes[:'parent_id']
|
|
358
|
-
end
|
|
359
|
-
|
|
360
|
-
if attributes.key?(:'supplier_name')
|
|
361
|
-
self.supplier_name = attributes[:'supplier_name']
|
|
362
|
-
end
|
|
363
|
-
|
|
364
|
-
if attributes.key?(:'attachments')
|
|
365
|
-
if (value = attributes[:'attachments']).is_a?(Array)
|
|
366
|
-
self.attachments = value
|
|
367
|
-
end
|
|
368
|
-
end
|
|
369
|
-
|
|
370
|
-
if attributes.key?(:'quantity')
|
|
371
|
-
self.quantity = attributes[:'quantity']
|
|
372
|
-
end
|
|
373
|
-
|
|
374
|
-
if attributes.key?(:'po_unit')
|
|
375
|
-
self.po_unit = attributes[:'po_unit']
|
|
376
|
-
end
|
|
377
|
-
|
|
378
|
-
if attributes.key?(:'po_status')
|
|
379
|
-
self.po_status = attributes[:'po_status']
|
|
380
|
-
end
|
|
381
|
-
|
|
382
|
-
if attributes.key?(:'unit_code')
|
|
383
|
-
self.unit_code = attributes[:'unit_code']
|
|
384
|
-
end
|
|
385
|
-
|
|
386
|
-
if attributes.key?(:'u_id')
|
|
387
|
-
self.u_id = attributes[:'u_id']
|
|
388
|
-
end
|
|
389
|
-
|
|
390
|
-
if attributes.key?(:'is_transfer')
|
|
391
|
-
self.is_transfer = attributes[:'is_transfer']
|
|
392
|
-
end
|
|
393
|
-
end
|
|
394
|
-
|
|
395
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
396
|
-
# @return Array for valid properties with the reasons
|
|
397
|
-
def list_invalid_properties
|
|
398
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
399
|
-
invalid_properties = Array.new
|
|
400
|
-
if @id.nil?
|
|
401
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
402
|
-
end
|
|
403
|
-
|
|
404
|
-
if @quantity_used.nil?
|
|
405
|
-
invalid_properties.push('invalid value for "quantity_used", quantity_used cannot be nil.')
|
|
406
|
-
end
|
|
407
|
-
|
|
408
|
-
if @environment_type.nil?
|
|
409
|
-
invalid_properties.push('invalid value for "environment_type", environment_type cannot be nil.')
|
|
410
|
-
end
|
|
411
|
-
|
|
412
|
-
invalid_properties
|
|
413
|
-
end
|
|
414
|
-
|
|
415
|
-
# Check to see if the all the properties in the model are valid
|
|
416
|
-
# @return true if the model is valid
|
|
417
|
-
def valid?
|
|
418
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
419
|
-
return false if @id.nil?
|
|
420
|
-
return false if @quantity_used.nil?
|
|
421
|
-
return false if @environment_type.nil?
|
|
422
|
-
true
|
|
423
|
-
end
|
|
424
|
-
|
|
425
|
-
# Custom attribute writer method with validation
|
|
426
|
-
# @param [Object] id Value to be assigned
|
|
427
|
-
def id=(id)
|
|
428
|
-
if id.nil?
|
|
429
|
-
fail ArgumentError, 'id cannot be nil'
|
|
430
|
-
end
|
|
431
|
-
|
|
432
|
-
@id = id
|
|
433
|
-
end
|
|
434
|
-
|
|
435
|
-
# Custom attribute writer method with validation
|
|
436
|
-
# @param [Object] quantity_used Value to be assigned
|
|
437
|
-
def quantity_used=(quantity_used)
|
|
438
|
-
if quantity_used.nil?
|
|
439
|
-
fail ArgumentError, 'quantity_used cannot be nil'
|
|
440
|
-
end
|
|
441
|
-
|
|
442
|
-
@quantity_used = quantity_used
|
|
443
|
-
end
|
|
444
|
-
|
|
445
|
-
# Custom attribute writer method with validation
|
|
446
|
-
# @param [Object] environment_type Value to be assigned
|
|
447
|
-
def environment_type=(environment_type)
|
|
448
|
-
if environment_type.nil?
|
|
449
|
-
fail ArgumentError, 'environment_type cannot be nil'
|
|
450
|
-
end
|
|
451
|
-
|
|
452
|
-
@environment_type = environment_type
|
|
453
|
-
end
|
|
454
|
-
|
|
455
|
-
# Checks equality by comparing each attribute.
|
|
456
|
-
# @param [Object] Object to be compared
|
|
457
|
-
def ==(o)
|
|
458
|
-
return true if self.equal?(o)
|
|
459
|
-
self.class == o.class &&
|
|
460
|
-
id == o.id &&
|
|
461
|
-
production_id == o.production_id &&
|
|
462
|
-
purchase_order_detail_id == o.purchase_order_detail_id &&
|
|
463
|
-
material_name == o.material_name &&
|
|
464
|
-
quantity_used == o.quantity_used &&
|
|
465
|
-
unit == o.unit &&
|
|
466
|
-
tenant_id == o.tenant_id &&
|
|
467
|
-
environment_type == o.environment_type &&
|
|
468
|
-
created_by == o.created_by &&
|
|
469
|
-
created_at == o.created_at &&
|
|
470
|
-
company_id == o.company_id &&
|
|
471
|
-
receipt_id == o.receipt_id &&
|
|
472
|
-
status == o.status &&
|
|
473
|
-
updated_by == o.updated_by &&
|
|
474
|
-
updated_at == o.updated_at &&
|
|
475
|
-
loss == o.loss &&
|
|
476
|
-
available_quantity == o.available_quantity &&
|
|
477
|
-
u_name == o.u_name &&
|
|
478
|
-
order_number == o.order_number &&
|
|
479
|
-
line_number == o.line_number &&
|
|
480
|
-
unique_no == o.unique_no &&
|
|
481
|
-
material_code == o.material_code &&
|
|
482
|
-
scope_code == o.scope_code &&
|
|
483
|
-
single_component == o.single_component &&
|
|
484
|
-
parent_id == o.parent_id &&
|
|
485
|
-
supplier_name == o.supplier_name &&
|
|
486
|
-
attachments == o.attachments &&
|
|
487
|
-
quantity == o.quantity &&
|
|
488
|
-
po_unit == o.po_unit &&
|
|
489
|
-
po_status == o.po_status &&
|
|
490
|
-
unit_code == o.unit_code &&
|
|
491
|
-
u_id == o.u_id &&
|
|
492
|
-
is_transfer == o.is_transfer
|
|
493
|
-
end
|
|
494
|
-
|
|
495
|
-
# @see the `==` method
|
|
496
|
-
# @param [Object] Object to be compared
|
|
497
|
-
def eql?(o)
|
|
498
|
-
self == o
|
|
499
|
-
end
|
|
500
|
-
|
|
501
|
-
# Calculates hash code according to all attributes.
|
|
502
|
-
# @return [Integer] Hash code
|
|
503
|
-
def hash
|
|
504
|
-
[id, production_id, purchase_order_detail_id, material_name, quantity_used, unit, tenant_id, environment_type, created_by, created_at, company_id, receipt_id, status, updated_by, updated_at, loss, available_quantity, u_name, order_number, line_number, unique_no, material_code, scope_code, single_component, parent_id, supplier_name, attachments, quantity, po_unit, po_status, unit_code, u_id, is_transfer].hash
|
|
505
|
-
end
|
|
506
|
-
|
|
507
|
-
# Builds the object from hash
|
|
508
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
509
|
-
# @return [Object] Returns the model itself
|
|
510
|
-
def self.build_from_hash(attributes)
|
|
511
|
-
return nil unless attributes.is_a?(Hash)
|
|
512
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
513
|
-
transformed_hash = {}
|
|
514
|
-
openapi_types.each_pair do |key, type|
|
|
515
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
516
|
-
transformed_hash["#{key}"] = nil
|
|
517
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
518
|
-
# check to ensure the input is an array given that the attribute
|
|
519
|
-
# is documented as an array but the input is not
|
|
520
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
521
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
522
|
-
end
|
|
523
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
524
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
525
|
-
end
|
|
526
|
-
end
|
|
527
|
-
new(transformed_hash)
|
|
528
|
-
end
|
|
529
|
-
|
|
530
|
-
# Returns the object in the form of hash
|
|
531
|
-
# @return [Hash] Returns the object in the form of hash
|
|
532
|
-
def to_hash
|
|
533
|
-
hash = {}
|
|
534
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
535
|
-
value = self.send(attr)
|
|
536
|
-
if value.nil?
|
|
537
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
538
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
539
|
-
end
|
|
540
|
-
|
|
541
|
-
hash[param] = _to_hash(value)
|
|
542
|
-
end
|
|
543
|
-
hash
|
|
544
|
-
end
|
|
545
|
-
|
|
546
|
-
end
|
|
547
|
-
|
|
548
|
-
end
|