1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Shippinno\YahooShoppingJp\Request; |
4
|
|
|
|
5
|
|
|
|
6
|
|
|
use FluidXml\FluidXml; |
7
|
|
|
use LogicException; |
8
|
|
|
use Shippinno\YahooShoppingJp\Api\UpdateOrderInfoApi; |
9
|
|
|
use Shippinno\YahooShoppingJp\Enum\ArriveType; |
10
|
|
|
use Shippinno\YahooShoppingJp\Enum\BillAddressFrom; |
11
|
|
|
use Shippinno\YahooShoppingJp\Enum\PayKind; |
12
|
|
|
use Shippinno\YahooShoppingJp\Enum\PayMethod; |
13
|
|
|
use Shippinno\YahooShoppingJp\Enum\PayType; |
14
|
|
|
use Shippinno\YahooShoppingJp\Enum\RefundStatus; |
15
|
|
|
use Shippinno\YahooShoppingJp\Enum\ShipMethod; |
16
|
|
|
use Shippinno\YahooShoppingJp\Enum\SuspectFlag; |
17
|
|
|
use Shippinno\YahooShoppingJp\Response\UpdateOrderInfoResponse; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* Class UpdateOrderInfoRequest |
21
|
|
|
* |
22
|
|
|
* @package Shippinno\YahooShoppingJp\Request |
23
|
|
|
*/ |
24
|
|
|
class UpdateOrderInfoRequest extends AbstractRequest |
25
|
|
|
{ |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* @return UpdateOrderInfoApi |
29
|
|
|
*/ |
30
|
|
|
public function api() |
31
|
|
|
{ |
32
|
|
|
return new UpdateOrderInfoApi; |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @return UpdateOrderInfoResponse |
37
|
|
|
*/ |
38
|
|
|
public function response() |
39
|
|
|
{ |
40
|
|
|
return new UpdateOrderInfoResponse; |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @return void |
45
|
|
|
*/ |
46
|
|
|
protected function validateParams() |
47
|
|
|
{ |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @return string |
52
|
|
|
*/ |
53
|
|
|
public function getParams() |
54
|
|
|
{ |
55
|
|
|
$this->validateParams(); |
56
|
|
|
|
57
|
|
|
$fluidXml = new FluidXml('Req'); |
58
|
|
|
$fluidXml->add($this->params); |
59
|
|
|
|
60
|
|
|
return $fluidXml->xml(); |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* [必須]注文ID |
65
|
|
|
* |
66
|
|
|
* @param string $orderId |
67
|
|
|
* @return self |
68
|
|
|
*/ |
69
|
|
|
public function setOrderId(string $orderId): self |
70
|
|
|
{ |
71
|
|
|
if (isset($this->params['Target']['OrderId'])) { |
72
|
|
|
throw new LogicException('OrderId is already set.'); |
73
|
|
|
} |
74
|
|
|
$this->params['Target']['OrderId'] = $orderId; |
75
|
|
|
|
76
|
|
|
return $this; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* [必須]ストアアカウント |
81
|
|
|
* |
82
|
|
|
* @param string $sellerId |
83
|
|
|
* @return self |
84
|
|
|
*/ |
85
|
|
View Code Duplication |
public function setSellerId(string $sellerId): self |
|
|
|
|
86
|
|
|
{ |
87
|
|
|
if (isset($this->params['SellerId'])) { |
88
|
|
|
throw new LogicException('SellerId is already set.'); |
89
|
|
|
} |
90
|
|
|
$this->params['SellerId'] = $sellerId; |
91
|
|
|
|
92
|
|
|
return $this; |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* 更新者名(ビジネスID登録氏名) |
97
|
|
|
* セラー更新のみ |
98
|
|
|
* |
99
|
|
|
* @param string $operationUser |
100
|
|
|
* @return self |
101
|
|
|
*/ |
102
|
|
|
public function setOperationUser(string $operationUser): self |
103
|
|
|
{ |
104
|
|
|
if (isset($this->params['Target']['OperationUser'])) { |
105
|
|
|
throw new LogicException('OperationUser is already set.'); |
106
|
|
|
} |
107
|
|
|
$this->params['Target']['OperationUser'] = $operationUser; |
108
|
|
|
|
109
|
|
|
return $this; |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* 閲覧済みフラグ |
114
|
|
|
* 注文情報を更新した場合、自動で閲覧済みになります。 |
115
|
|
|
* また、未閲覧から閲覧済みにのみ更新できます。 |
116
|
|
|
* 閲覧済み→未閲覧:更新できません |
117
|
|
|
* 未閲覧→閲覧済み:更新できます |
118
|
|
|
* false : 未閲覧 |
119
|
|
|
* true : 閲覧済み |
120
|
|
|
* |
121
|
|
|
* @return self |
122
|
|
|
*/ |
123
|
|
|
public function setIsSeen(bool $isSeen): self |
124
|
|
|
{ |
125
|
|
|
if (isset($this->params['Order']['IsSeen'])) { |
126
|
|
|
throw new LogicException('IsSeen is already set.'); |
127
|
|
|
} |
128
|
|
|
$this->params['Order']['IsSeen'] = $isSeen ? 'true' : 'false'; |
129
|
|
|
|
130
|
|
|
return $this; |
131
|
|
|
} |
132
|
|
|
|
133
|
|
|
/** |
134
|
|
|
* 悪戯フラグ |
135
|
|
|
* |
136
|
|
|
* @param SuspectFlag $suspectFlag |
137
|
|
|
* @return self |
138
|
|
|
*/ |
139
|
|
|
public function setSuspect(SuspectFlag $suspectFlag): self |
140
|
|
|
{ |
141
|
|
|
if (isset($this->params['Order']['Suspect'])) { |
142
|
|
|
throw new LogicException('Suspect is already set.'); |
143
|
|
|
} |
144
|
|
|
$this->params['Order']['Suspect'] = $suspectFlag->getValue(); |
145
|
|
|
|
146
|
|
|
return $this; |
147
|
|
|
} |
148
|
|
|
|
149
|
|
|
/** |
150
|
|
|
* 支払い分類 |
151
|
|
|
* |
152
|
|
|
* @param PayType $payType |
153
|
|
|
* @return self |
154
|
|
|
*/ |
155
|
|
|
public function setPayType(PayType $payType): self |
156
|
|
|
{ |
157
|
|
|
if (isset($this->params['Order']['PayType'])) { |
158
|
|
|
throw new LogicException('PayType is already set.'); |
159
|
|
|
} |
160
|
|
|
$this->params['Order']['PayType'] = $payType->getValue(); |
161
|
|
|
|
162
|
|
|
return $this; |
163
|
|
|
} |
164
|
|
|
|
165
|
|
|
/** |
166
|
|
|
* 支払い種別 |
167
|
|
|
* |
168
|
|
|
* @param PayKind $payKind |
169
|
|
|
* @return self |
170
|
|
|
*/ |
171
|
|
|
public function setPayKind(PayKind $payKind): self |
172
|
|
|
{ |
173
|
|
|
if (isset($this->params['Order']['PayKind'])) { |
174
|
|
|
throw new LogicException('PayKind is already set.'); |
175
|
|
|
} |
176
|
|
|
$this->params['Order']['PayKind'] = $payKind->getValue(); |
177
|
|
|
|
178
|
|
|
return $this; |
179
|
|
|
} |
180
|
|
|
|
181
|
|
|
/** |
182
|
|
|
* 支払い方法 |
183
|
|
|
* |
184
|
|
|
* @param PayMethod $payMethod |
185
|
|
|
* @return self |
186
|
|
|
*/ |
187
|
|
|
public function setPayMethod(PayMethod $payMethod): self |
188
|
|
|
{ |
189
|
|
|
if (isset($this->params['Order']['PayMethod'])) { |
190
|
|
|
throw new LogicException('PayMethod is already set.'); |
191
|
|
|
} |
192
|
|
|
$this->params['Order']['PayMethod'] = $payMethod->getValue(); |
193
|
|
|
|
194
|
|
|
return $this; |
195
|
|
|
} |
196
|
|
|
|
197
|
|
|
/** |
198
|
|
|
* 支払い方法名称 |
199
|
|
|
* max:150byte |
200
|
|
|
* |
201
|
|
|
* @param string $payMethodName |
202
|
|
|
* @return self |
203
|
|
|
*/ |
204
|
|
|
public function setPayMethodName(string $payMethodName): self |
205
|
|
|
{ |
206
|
|
|
if (isset($this->params['Order']['PayMethodName'])) { |
207
|
|
|
throw new LogicException('PayMethodName is already set.'); |
208
|
|
|
} |
209
|
|
|
$this->params['Order']['PayMethodName'] = $payMethodName; |
210
|
|
|
|
211
|
|
|
return $this; |
212
|
|
|
} |
213
|
|
|
|
214
|
|
|
/** |
215
|
|
|
* ストアステータス |
216
|
|
|
* ストアが独自に設定可能なステータスです。 |
217
|
|
|
* max:2byte |
218
|
|
|
* |
219
|
|
|
* @param string $storeStatus |
220
|
|
|
* @return self |
221
|
|
|
*/ |
222
|
|
|
public function setStoreStatus(string $storeStatus): self |
223
|
|
|
{ |
224
|
|
|
if (isset($this->params['Order']['StoreStatus'])) { |
225
|
|
|
throw new LogicException('StoreStatus is already set.'); |
226
|
|
|
} |
227
|
|
|
$this->params['Order']['StoreStatus'] = $storeStatus; |
228
|
|
|
|
229
|
|
|
return $this; |
230
|
|
|
} |
231
|
|
|
|
232
|
|
|
/** |
233
|
|
|
* 注文伝票出力時刻 |
234
|
|
|
* 注文伝票を出力した日時です。 |
235
|
|
|
* format:YYYYMMDDHH24MISS |
236
|
|
|
* |
237
|
|
|
* @param \DateTimeImmutable $printSlipTime |
238
|
|
|
* @return self |
239
|
|
|
*/ |
240
|
|
View Code Duplication |
public function setPrintSlipTime(\DateTimeImmutable $printSlipTime): self |
|
|
|
|
241
|
|
|
{ |
242
|
|
|
if (isset($this->params['Order']['PrintSlipTime'])) { |
243
|
|
|
throw new LogicException('PrintSlipTime is already set.'); |
244
|
|
|
} |
245
|
|
|
$this->params['Order']['PrintSlipTime'] = $printSlipTime->format('YmdHis'); |
246
|
|
|
|
247
|
|
|
return $this; |
248
|
|
|
} |
249
|
|
|
|
250
|
|
|
/** |
251
|
|
|
* 納品書出力時刻 |
252
|
|
|
* 納品書を出力した日時です。 |
253
|
|
|
* format:YYYYMMDDHH24MISS |
254
|
|
|
* |
255
|
|
|
* @param \DateTimeImmutable $printDeliveryTime |
256
|
|
|
* @return self |
257
|
|
|
*/ |
258
|
|
View Code Duplication |
public function setPrintDeliveryTime(\DateTimeImmutable $printDeliveryTime): self |
|
|
|
|
259
|
|
|
{ |
260
|
|
|
if (isset($this->params['Order']['PrintDeliveryTime'])) { |
261
|
|
|
throw new LogicException('PrintDeliveryTime is already set.'); |
262
|
|
|
} |
263
|
|
|
$this->params['Order']['PrintDeliveryTime'] = $printDeliveryTime->format('YmdHis'); |
264
|
|
|
|
265
|
|
|
return $this; |
266
|
|
|
} |
267
|
|
|
|
268
|
|
|
/** |
269
|
|
|
* 請求書出力時刻 |
270
|
|
|
* 請求書を出力した日時です。 |
271
|
|
|
* format:YYYYMMDDHH24MISS |
272
|
|
|
* |
273
|
|
|
* @param \DateTimeImmutable $printBillTime |
274
|
|
|
* @return self |
275
|
|
|
*/ |
276
|
|
View Code Duplication |
public function setPrintBillTime(\DateTimeImmutable $printBillTime): self |
|
|
|
|
277
|
|
|
{ |
278
|
|
|
if (isset($this->params['Order']['PrintBillTime'])) { |
279
|
|
|
throw new LogicException('PrintBillTime is already set.'); |
280
|
|
|
} |
281
|
|
|
$this->params['Order']['PrintBillTime'] = $printBillTime->format('YmdHis'); |
282
|
|
|
|
283
|
|
|
return $this; |
284
|
|
|
} |
285
|
|
|
|
286
|
|
|
/** |
287
|
|
|
* バイヤーコメント |
288
|
|
|
* ご要望欄入力内容です。 |
289
|
|
|
* max:750byte |
290
|
|
|
* |
291
|
|
|
* @param string $buyerComments |
292
|
|
|
* @return self |
293
|
|
|
*/ |
294
|
|
|
public function setBuyerComments(string $buyerComments): self |
295
|
|
|
{ |
296
|
|
|
if (isset($this->params['Order']['BuyerComments'])) { |
297
|
|
|
throw new LogicException('BuyerComments is already set.'); |
298
|
|
|
} |
299
|
|
|
$this->params['Order']['BuyerComments'] = $buyerComments; |
300
|
|
|
|
301
|
|
|
return $this; |
302
|
|
|
} |
303
|
|
|
|
304
|
|
|
/** |
305
|
|
|
* セラーコメント |
306
|
|
|
* セラーがカートに表示しているコメント文字列です。 |
307
|
|
|
* max:750byte |
308
|
|
|
* |
309
|
|
|
* @param string $sellerComments |
310
|
|
|
* @return self |
311
|
|
|
*/ |
312
|
|
|
public function setSellerComments(string $sellerComments): self |
313
|
|
|
{ |
314
|
|
|
if (isset($this->params['Order']['SellerComments'])) { |
315
|
|
|
throw new LogicException('SellerComments is already set.'); |
316
|
|
|
} |
317
|
|
|
$this->params['Order']['SellerComments'] = $sellerComments; |
318
|
|
|
|
319
|
|
|
return $this; |
320
|
|
|
} |
321
|
|
|
|
322
|
|
|
/** |
323
|
|
|
* 社内メモ |
324
|
|
|
* ビジネス注文管理ツールでセラーが入力した社内メモです |
325
|
|
|
* max:未定 |
326
|
|
|
* |
327
|
|
|
* @param string $notes |
328
|
|
|
* @return self |
329
|
|
|
*/ |
330
|
|
View Code Duplication |
public function setNotes(string $notes): self |
|
|
|
|
331
|
|
|
{ |
332
|
|
|
if (isset($this->params['Order']['Notes'])) { |
333
|
|
|
throw new LogicException('Notes is already set.'); |
334
|
|
|
} |
335
|
|
|
$this->params['Order']['Notes'] = $notes; |
336
|
|
|
|
337
|
|
|
return $this; |
338
|
|
|
} |
339
|
|
|
|
340
|
|
|
/** |
341
|
|
|
* 返金ステータス |
342
|
|
|
* APIで更新できるのは1:必要から2:返金済みへの更新のみ。 |
343
|
|
|
* |
344
|
|
|
* @param RefundStatus $refundStatus |
345
|
|
|
* @return self |
346
|
|
|
*/ |
347
|
|
|
public function setRefundStatus(RefundStatus $refundStatus): self |
348
|
|
|
{ |
349
|
|
|
if (isset($this->params['Order']['RefundStatus'])) { |
350
|
|
|
throw new LogicException('RefundStatus is already set.'); |
351
|
|
|
} |
352
|
|
|
$this->params['Order']['RefundStatus'] = $refundStatus->getValue(); |
353
|
|
|
|
354
|
|
|
return $this; |
355
|
|
|
} |
356
|
|
|
|
357
|
|
|
/** |
358
|
|
|
* @param \DateTimeImmutable $payDate |
359
|
|
|
* @return self |
360
|
|
|
* @internal param \DateTimeImmutable $printBillTime |
361
|
|
|
*/ |
362
|
|
View Code Duplication |
public function setPayDate(\DateTimeImmutable $payDate): self |
|
|
|
|
363
|
|
|
{ |
364
|
|
|
if (isset($this->params['Pay']['PayDate'])) { |
365
|
|
|
throw new LogicException('PayDate is already set.'); |
366
|
|
|
} |
367
|
|
|
$this->params['Pay']['PayDate'] = $payDate->format('Ymd'); |
368
|
|
|
|
369
|
|
|
return $this; |
370
|
|
|
} |
371
|
|
|
|
372
|
|
|
/** |
373
|
|
|
* 入金処理備考 |
374
|
|
|
* max:1000byte |
375
|
|
|
* |
376
|
|
|
* @param string $payNotes |
377
|
|
|
* @return self |
378
|
|
|
*/ |
379
|
|
|
public function setPayNotes(string $payNotes): self |
380
|
|
|
{ |
381
|
|
|
if (isset($this->params['Pay']['PayNotes'])) { |
382
|
|
|
throw new LogicException('PayNotes is already set.'); |
383
|
|
|
} |
384
|
|
|
$this->params['Pay']['PayNotes'] = $payNotes; |
385
|
|
|
|
386
|
|
|
return $this; |
387
|
|
|
} |
388
|
|
|
|
389
|
|
|
/** |
390
|
|
|
* 代金支払い管理注文期限日時 |
391
|
|
|
* format:YYYYMMDD |
392
|
|
|
* |
393
|
|
|
* @param \DateTimeImmutable $payManageLimitDate |
394
|
|
|
* @return self |
395
|
|
|
* @internal param \DateTimeImmutable $printBillTime |
396
|
|
|
*/ |
397
|
|
View Code Duplication |
public function setPayManageLimitDate(\DateTimeImmutable $payManageLimitDate): self |
|
|
|
|
398
|
|
|
{ |
399
|
|
|
if (isset($this->params['Pay']['PayManageLimitDate'])) { |
400
|
|
|
throw new LogicException('PayManageLimitDate is already set.'); |
401
|
|
|
} |
402
|
|
|
$this->params['Pay']['PayManageLimitDate'] = $payManageLimitDate->format('Ymd'); |
403
|
|
|
|
404
|
|
|
return $this; |
405
|
|
|
} |
406
|
|
|
|
407
|
|
|
/** |
408
|
|
|
* 請求書有無 |
409
|
|
|
* 伝票画面上では、「納品書」表記です。 |
410
|
|
|
* 帳票出力でも「納品書」出力で、「明細書」が出力可能です。 |
411
|
|
|
* キーなし : カートに設定なし |
412
|
|
|
* false : 領袖書不要 |
413
|
|
|
* true : 領袖書必要 |
414
|
|
|
* |
415
|
|
|
* @param bool|string $needBillSlip |
416
|
|
|
* @return self |
417
|
|
|
*/ |
418
|
|
|
public function setNeedBillSlip(bool $needBillSlip): self |
419
|
|
|
{ |
420
|
|
|
if (isset($this->params['Pay']['NeedBillSlip'])) { |
421
|
|
|
throw new LogicException('NeedBillSlip is already set.'); |
422
|
|
|
} |
423
|
|
|
$this->params['Pay']['NeedBillSlip'] = $needBillSlip ? 1 : 0; |
424
|
|
|
|
425
|
|
|
return $this; |
426
|
|
|
} |
427
|
|
|
|
428
|
|
|
/** |
429
|
|
|
* 明細書有無 |
430
|
|
|
* キーなし : カートに設定なし |
431
|
|
|
* false : 領袖書不要 |
432
|
|
|
* true : 領袖書必要 |
433
|
|
|
* |
434
|
|
|
* @param bool|string $needDetailedSlip |
435
|
|
|
* @return self |
436
|
|
|
*/ |
437
|
|
|
public function setNeedDetailedSlip(bool $needDetailedSlip): self |
438
|
|
|
{ |
439
|
|
|
if (isset($this->params['Pay']['NeedDetailedSlip'])) { |
440
|
|
|
throw new LogicException('NeedDetailedSlip is already set.'); |
441
|
|
|
} |
442
|
|
|
$this->params['Pay']['NeedDetailedSlip'] = $needDetailedSlip ? 1 : 0; |
443
|
|
|
|
444
|
|
|
return $this; |
445
|
|
|
} |
446
|
|
|
|
447
|
|
|
/** |
448
|
|
|
* 領収書有無 |
449
|
|
|
* キーなし : カートに設定なし |
450
|
|
|
* false : 領袖書不要 |
451
|
|
|
* true : 領袖書必要 |
452
|
|
|
* |
453
|
|
|
* @param bool|string $needReceipt |
454
|
|
|
* @return self |
455
|
|
|
*/ |
456
|
|
|
public function setNeedReceipt(bool $needReceipt): self |
457
|
|
|
{ |
458
|
|
|
if (isset($this->params['Pay']['NeedReceipt'])) { |
459
|
|
|
throw new LogicException('NeedReceipt is already set.'); |
460
|
|
|
} |
461
|
|
|
$this->params['Pay']['NeedReceipt'] = $needReceipt ? 1 : 0; |
462
|
|
|
|
463
|
|
|
return $this; |
464
|
|
|
} |
465
|
|
|
|
466
|
|
|
/** |
467
|
|
|
* ご請求先名前 |
468
|
|
|
* max:297byte |
469
|
|
|
* |
470
|
|
|
* @param string $billFirstName |
471
|
|
|
* @return self |
472
|
|
|
*/ |
473
|
|
|
public function setBillFirstName(string $billFirstName): self |
474
|
|
|
{ |
475
|
|
|
if (isset($this->params['Pay']['BillFirstName'])) { |
476
|
|
|
throw new LogicException('BillFirstName is already set.'); |
477
|
|
|
} |
478
|
|
|
$this->params['Pay']['BillFirstName'] = $billFirstName; |
479
|
|
|
|
480
|
|
|
return $this; |
481
|
|
|
} |
482
|
|
|
|
483
|
|
|
/** |
484
|
|
|
* ご請求先名前(フリガナ) |
485
|
|
|
* max:297byte |
486
|
|
|
* |
487
|
|
|
* @param string $billFirstnameKana |
488
|
|
|
* @return self |
489
|
|
|
*/ |
490
|
|
|
public function setBillFirstnameKana(string $billFirstnameKana): self |
491
|
|
|
{ |
492
|
|
|
if (isset($this->params['Pay']['BillFirstnameKana'])) { |
493
|
|
|
throw new LogicException('BillFirstnameKana is already set.'); |
494
|
|
|
} |
495
|
|
|
$this->params['Pay']['BillFirstnameKana'] = $billFirstnameKana; |
496
|
|
|
|
497
|
|
|
return $this; |
498
|
|
|
} |
499
|
|
|
|
500
|
|
|
/** |
501
|
|
|
* ご請求先名字 |
502
|
|
|
* max:297byte |
503
|
|
|
* |
504
|
|
|
* @param string $billLastName |
505
|
|
|
* @return self |
506
|
|
|
*/ |
507
|
|
|
public function setBillLastName(string $billLastName): self |
508
|
|
|
{ |
509
|
|
|
if (isset($this->params['Pay']['BillLastName'])) { |
510
|
|
|
throw new LogicException('BillLastName is already set.'); |
511
|
|
|
} |
512
|
|
|
$this->params['Pay']['BillLastName'] = $billLastName; |
513
|
|
|
|
514
|
|
|
return $this; |
515
|
|
|
} |
516
|
|
|
|
517
|
|
|
/** |
518
|
|
|
* ご請求先名字(フリガナ) |
519
|
|
|
* max:297byte |
520
|
|
|
* |
521
|
|
|
* @param string $billLastNameKana |
522
|
|
|
* @return self |
523
|
|
|
*/ |
524
|
|
|
public function setBillLastNameKana(string $billLastNameKana): self |
525
|
|
|
{ |
526
|
|
|
if (isset($this->params['Pay']['BillLastNameKana'])) { |
527
|
|
|
throw new LogicException('BillLastNameKana is already set.'); |
528
|
|
|
} |
529
|
|
|
$this->params['Pay']['BillLastNameKana'] = $billLastNameKana; |
530
|
|
|
|
531
|
|
|
return $this; |
532
|
|
|
} |
533
|
|
|
|
534
|
|
|
/** |
535
|
|
|
* ご請求先郵便番号 |
536
|
|
|
* max:10byte |
537
|
|
|
* |
538
|
|
|
* @param string $billZipCode |
539
|
|
|
* @return self |
540
|
|
|
*/ |
541
|
|
|
public function setBillZipCode(string $billZipCode): self |
542
|
|
|
{ |
543
|
|
|
if (isset($this->params['Pay']['BillZipCode'])) { |
544
|
|
|
throw new LogicException('BillZipCode is already set.'); |
545
|
|
|
} |
546
|
|
|
$this->params['Pay']['BillZipCode'] = $billZipCode; |
547
|
|
|
|
548
|
|
|
return $this; |
549
|
|
|
} |
550
|
|
|
|
551
|
|
|
/** |
552
|
|
|
* ご請求先都道府県 |
553
|
|
|
* 海外の場合「その他」が入ります。 |
554
|
|
|
* max:12byte |
555
|
|
|
* |
556
|
|
|
* @param string $billPrefecture |
557
|
|
|
* @return self |
558
|
|
|
*/ |
559
|
|
|
public function setBillPrefecture(string $billPrefecture): self |
560
|
|
|
{ |
561
|
|
|
if (isset($this->params['Pay']['BillPrefecture'])) { |
562
|
|
|
throw new LogicException('BillPrefecture is already set.'); |
563
|
|
|
} |
564
|
|
|
$this->params['Pay']['BillPrefecture'] = $billPrefecture; |
565
|
|
|
|
566
|
|
|
return $this; |
567
|
|
|
} |
568
|
|
|
|
569
|
|
|
/** |
570
|
|
|
* ご請求先都道府県フリガナ |
571
|
|
|
* max:18byte |
572
|
|
|
* |
573
|
|
|
* @param string $billPrefectureKana |
574
|
|
|
* @return self |
575
|
|
|
*/ |
576
|
|
|
public function setBillPrefectureKana(string $billPrefectureKana): self |
577
|
|
|
{ |
578
|
|
|
if (isset($this->params['Pay']['BillPrefectureKana'])) { |
579
|
|
|
throw new LogicException('BillPrefectureKana is already set.'); |
580
|
|
|
} |
581
|
|
|
$this->params['Pay']['BillPrefectureKana'] = $billPrefectureKana; |
582
|
|
|
|
583
|
|
|
return $this; |
584
|
|
|
} |
585
|
|
|
|
586
|
|
|
/** |
587
|
|
|
* ご請求先市区郡 |
588
|
|
|
* max:297byte |
589
|
|
|
* |
590
|
|
|
* @param string $billCity |
591
|
|
|
* @return self |
592
|
|
|
*/ |
593
|
|
|
public function setBillCity(string $billCity): self |
594
|
|
|
{ |
595
|
|
|
if (isset($this->params['Pay']['BillCity'])) { |
596
|
|
|
throw new LogicException('BillCity is already set.'); |
597
|
|
|
} |
598
|
|
|
$this->params['Pay']['BillCity'] = $billCity; |
599
|
|
|
|
600
|
|
|
return $this; |
601
|
|
|
} |
602
|
|
|
|
603
|
|
|
/** |
604
|
|
|
* ご請求先市区郡フリガナ |
605
|
|
|
* max:297byte |
606
|
|
|
* |
607
|
|
|
* @param string $billCityKana |
608
|
|
|
* @return self |
609
|
|
|
*/ |
610
|
|
|
public function setBillCityKana(string $billCityKana): self |
611
|
|
|
{ |
612
|
|
|
if (isset($this->params['Pay']['BillCityKana'])) { |
613
|
|
|
throw new LogicException('BillCityKana is already set.'); |
614
|
|
|
} |
615
|
|
|
$this->params['Pay']['BillCityKana'] = $billCityKana; |
616
|
|
|
|
617
|
|
|
return $this; |
618
|
|
|
} |
619
|
|
|
|
620
|
|
|
/** |
621
|
|
|
* ご請求先住所引用元 |
622
|
|
|
* |
623
|
|
|
* @param BillAddressFrom $billAddressFrom |
624
|
|
|
* @return self |
625
|
|
|
*/ |
626
|
|
View Code Duplication |
public function setBillAddressFrom(BillAddressFrom $billAddressFrom): self |
|
|
|
|
627
|
|
|
{ |
628
|
|
|
if (isset($this->params['Pay']['BillAddressFrom'])) { |
629
|
|
|
throw new LogicException('BillAddressFrom is already set.'); |
630
|
|
|
} |
631
|
|
|
$this->params['Pay']['BillAddressFrom'] = $billAddressFrom->getValue(); |
632
|
|
|
|
633
|
|
|
return $this; |
634
|
|
|
} |
635
|
|
|
|
636
|
|
|
/** |
637
|
|
|
* ご請求先住所1 |
638
|
|
|
* max:297byte |
639
|
|
|
* |
640
|
|
|
* @param string $billAddress1 |
641
|
|
|
* @return self |
642
|
|
|
*/ |
643
|
|
|
public function setBillAddress1(string $billAddress1): self |
644
|
|
|
{ |
645
|
|
|
if (isset($this->params['Pay']['BillAddress1'])) { |
646
|
|
|
throw new LogicException('BillAddress1 is already set.'); |
647
|
|
|
} |
648
|
|
|
$this->params['Pay']['BillAddress1'] = $billAddress1; |
649
|
|
|
|
650
|
|
|
return $this; |
651
|
|
|
} |
652
|
|
|
|
653
|
|
|
/** |
654
|
|
|
* ご請求先住所1フリガナ |
655
|
|
|
* max:297byte |
656
|
|
|
* |
657
|
|
|
* @param string $billAddress1Kana |
658
|
|
|
* @return self |
659
|
|
|
*/ |
660
|
|
|
public function setBillAddress1Kana(string $billAddress1Kana): self |
661
|
|
|
{ |
662
|
|
|
if (isset($this->params['Pay']['BillAddress1Kana'])) { |
663
|
|
|
throw new LogicException('BillAddress1Kana is already set.'); |
664
|
|
|
} |
665
|
|
|
$this->params['Pay']['BillAddress1Kana'] = $billAddress1Kana; |
666
|
|
|
|
667
|
|
|
return $this; |
668
|
|
|
} |
669
|
|
|
|
670
|
|
|
/** |
671
|
|
|
* ご請求先住所2 |
672
|
|
|
* max:297byte |
673
|
|
|
* |
674
|
|
|
* @param string $billAddress2 |
675
|
|
|
* @return self |
676
|
|
|
*/ |
677
|
|
|
public function setBillAddress2(string $billAddress2): self |
678
|
|
|
{ |
679
|
|
|
if (isset($this->params['Pay']['BillAddress2'])) { |
680
|
|
|
throw new LogicException('BillAddress2 is already set.'); |
681
|
|
|
} |
682
|
|
|
$this->params['Pay']['BillAddress2'] = $billAddress2; |
683
|
|
|
|
684
|
|
|
return $this; |
685
|
|
|
} |
686
|
|
|
|
687
|
|
|
/** |
688
|
|
|
* ご請求先住所2フリガナ |
689
|
|
|
* max:297byte |
690
|
|
|
* |
691
|
|
|
* @param string $billAddress2Kana |
692
|
|
|
* @return self |
693
|
|
|
*/ |
694
|
|
|
public function setBillAddress2Kana(string $billAddress2Kana): self |
695
|
|
|
{ |
696
|
|
|
if (isset($this->params['Pay']['BillAddress2Kana'])) { |
697
|
|
|
throw new LogicException('BillAddress2Kana is already set.'); |
698
|
|
|
} |
699
|
|
|
$this->params['Pay']['BillAddress2Kana'] = $billAddress2Kana; |
700
|
|
|
|
701
|
|
|
return $this; |
702
|
|
|
} |
703
|
|
|
|
704
|
|
|
/** |
705
|
|
|
* ご請求先電話番号 |
706
|
|
|
* max:14byte |
707
|
|
|
* |
708
|
|
|
* @param string $billPhoneNumber |
709
|
|
|
* @return self |
710
|
|
|
*/ |
711
|
|
|
public function setBillPhoneNumber(string $billPhoneNumber): self |
712
|
|
|
{ |
713
|
|
|
if (isset($this->params['Pay']['BillPhoneNumber'])) { |
714
|
|
|
throw new LogicException('BillPhoneNumber is already set.'); |
715
|
|
|
} |
716
|
|
|
$this->params['Pay']['BillPhoneNumber'] = $billPhoneNumber; |
717
|
|
|
|
718
|
|
|
return $this; |
719
|
|
|
} |
720
|
|
|
|
721
|
|
|
/** |
722
|
|
|
* ご請求先電話番号(緊急) |
723
|
|
|
* max:14byte |
724
|
|
|
* |
725
|
|
|
* @param string $billEmgPhoneNumber |
726
|
|
|
* @return self |
727
|
|
|
*/ |
728
|
|
|
public function setBillEmgPhoneNumber(string $billEmgPhoneNumber): self |
729
|
|
|
{ |
730
|
|
|
if (isset($this->params['Pay']['BillEmgPhoneNumber'])) { |
731
|
|
|
throw new LogicException('BillEmgPhoneNumber is already set.'); |
732
|
|
|
} |
733
|
|
|
$this->params['Pay']['BillEmgPhoneNumber'] = $billEmgPhoneNumber; |
734
|
|
|
|
735
|
|
|
return $this; |
736
|
|
|
} |
737
|
|
|
|
738
|
|
|
/** |
739
|
|
|
* ご請求先メールアドレス |
740
|
|
|
* バイヤーの入力したメールアドレスです。 |
741
|
|
|
* Wallet利用の場合でかつ追加メールアドレス欄に入力がある場合は追加メールアドレスを入れます。 |
742
|
|
|
* max:99length |
743
|
|
|
* |
744
|
|
|
* @param string $billMailAddress |
745
|
|
|
* @return self |
746
|
|
|
*/ |
747
|
|
|
public function setBillMailAddress(string $billMailAddress): self |
748
|
|
|
{ |
749
|
|
|
if (isset($this->params['Pay']['BillMailAddress'])) { |
750
|
|
|
throw new LogicException('BillMailAddress is already set.'); |
751
|
|
|
} |
752
|
|
|
$this->params['Pay']['BillMailAddress'] = $billMailAddress; |
753
|
|
|
|
754
|
|
|
return $this; |
755
|
|
|
} |
756
|
|
|
|
757
|
|
|
/** |
758
|
|
|
* ご請求先所属1フィールド名 |
759
|
|
|
* max:297byte |
760
|
|
|
* |
761
|
|
|
* @param string $billSection1Field |
762
|
|
|
* @return self |
763
|
|
|
*/ |
764
|
|
|
public function setBillSection1Field(string $billSection1Field): self |
765
|
|
|
{ |
766
|
|
|
if (isset($this->params['Pay']['BillSection1Field'])) { |
767
|
|
|
throw new LogicException('BillSection1Field is already set.'); |
768
|
|
|
} |
769
|
|
|
$this->params['Pay']['BillSection1Field'] = $billSection1Field; |
770
|
|
|
|
771
|
|
|
return $this; |
772
|
|
|
} |
773
|
|
|
|
774
|
|
|
/** |
775
|
|
|
* ご請求先所属1入力情報 |
776
|
|
|
* max:297byte |
777
|
|
|
* |
778
|
|
|
* @param string $billSection1Value |
779
|
|
|
* @return self |
780
|
|
|
*/ |
781
|
|
|
public function setBillSection1Value(string $billSection1Value): self |
782
|
|
|
{ |
783
|
|
|
if (isset($this->params['Pay']['BillSection1Value'])) { |
784
|
|
|
throw new LogicException('BillSection1Value is already set.'); |
785
|
|
|
} |
786
|
|
|
$this->params['Pay']['BillSection1Value'] = $billSection1Value; |
787
|
|
|
|
788
|
|
|
return $this; |
789
|
|
|
} |
790
|
|
|
|
791
|
|
|
/** |
792
|
|
|
* ご請求先所属2フィールド名 |
793
|
|
|
* max:297byte |
794
|
|
|
* |
795
|
|
|
* @param string $billSection2Field |
796
|
|
|
* @return self |
797
|
|
|
*/ |
798
|
|
|
public function setBillSection2Field(string $billSection2Field): self |
799
|
|
|
{ |
800
|
|
|
if (isset($this->params['Pay']['BillSection2Field'])) { |
801
|
|
|
throw new LogicException('BillSection2Field is already set.'); |
802
|
|
|
} |
803
|
|
|
$this->params['Pay']['BillSection2Field'] = $billSection2Field; |
804
|
|
|
|
805
|
|
|
return $this; |
806
|
|
|
} |
807
|
|
|
|
808
|
|
|
/** |
809
|
|
|
* ご請求先所属2入力情報 |
810
|
|
|
* max:297byte |
811
|
|
|
* |
812
|
|
|
* @param string $billSection2Value |
813
|
|
|
* @return self |
814
|
|
|
*/ |
815
|
|
|
public function setBillSection2Value(string $billSection2Value): self |
816
|
|
|
{ |
817
|
|
|
if (isset($this->params['Pay']['BillSection2Value'])) { |
818
|
|
|
throw new LogicException('BillSection2Value is already set.'); |
819
|
|
|
} |
820
|
|
|
$this->params['Pay']['BillSection2Value'] = $billSection2Value; |
821
|
|
|
|
822
|
|
|
return $this; |
823
|
|
|
} |
824
|
|
|
|
825
|
|
|
/** |
826
|
|
|
* 配送方法 |
827
|
|
|
* |
828
|
|
|
* @param ShipMethod $shipMethod |
829
|
|
|
* @return self |
830
|
|
|
*/ |
831
|
|
View Code Duplication |
public function setShipMethod(ShipMethod $shipMethod): self |
|
|
|
|
832
|
|
|
{ |
833
|
|
|
if (isset($this->params['Ship']['ShipMethod'])) { |
834
|
|
|
throw new LogicException('ShipMethod is already set.'); |
835
|
|
|
} |
836
|
|
|
$this->params['Ship']['ShipMethod'] = $shipMethod->getValue(); |
837
|
|
|
|
838
|
|
|
return $this; |
839
|
|
|
} |
840
|
|
|
|
841
|
|
|
/** |
842
|
|
|
* 配送方法名称 |
843
|
|
|
* ヤマト運輸など、お届け方法名称です。 |
844
|
|
|
* Keyと名称のセットはセラー登録次第なのでセラー毎に違います。 |
845
|
|
|
* max:297byte |
846
|
|
|
* |
847
|
|
|
* @param string $shipMethodName |
848
|
|
|
* @return self |
849
|
|
|
*/ |
850
|
|
|
public function setShipMethodName(string $shipMethodName): self |
851
|
|
|
{ |
852
|
|
|
if (isset($this->params['Ship']['ShipMethodName'])) { |
853
|
|
|
throw new LogicException('ShipMethodName is already set.'); |
854
|
|
|
} |
855
|
|
|
$this->params['Ship']['ShipMethodName'] = $shipMethodName; |
856
|
|
|
|
857
|
|
|
return $this; |
858
|
|
|
} |
859
|
|
|
|
860
|
|
|
/** |
861
|
|
|
* 配送希望日 |
862
|
|
|
* 注文管理で利用します(検索など)。 |
863
|
|
|
* FEツールでは、Null=お届け希望日なし、あすつくFLGあったらあすつく希望などです。 |
864
|
|
|
* format:YYYYMMDD |
865
|
|
|
* |
866
|
|
|
* @param \DateTimeImmutable $shipRequestDate |
867
|
|
|
* @return self |
868
|
|
|
*/ |
869
|
|
View Code Duplication |
public function setShipRequestDate(\DateTimeImmutable $shipRequestDate): self |
|
|
|
|
870
|
|
|
{ |
871
|
|
|
if (isset($this->params['Ship']['ShipRequestDate'])) { |
872
|
|
|
throw new LogicException('ShipRequestDate is already set.'); |
873
|
|
|
} |
874
|
|
|
$this->params['Ship']['ShipRequestDate'] = $shipRequestDate->format('Ymd'); |
875
|
|
|
|
876
|
|
|
return $this; |
877
|
|
|
} |
878
|
|
|
|
879
|
|
|
/** |
880
|
|
|
* 配送希望時間 |
881
|
|
|
* 12:00~14:00などです。 |
882
|
|
|
* max:13byte |
883
|
|
|
* |
884
|
|
|
* @param string $shipRequestTime |
885
|
|
|
* @return self |
886
|
|
|
*/ |
887
|
|
|
public function setShipRequestTime(string $shipRequestTime): self |
888
|
|
|
{ |
889
|
|
|
if (isset($this->params['Ship']['ShipRequestTime'])) { |
890
|
|
|
throw new LogicException('ShipRequestTime is already set.'); |
891
|
|
|
} |
892
|
|
|
$this->params['Ship']['ShipRequestTime'] = $shipRequestTime; |
893
|
|
|
|
894
|
|
|
return $this; |
895
|
|
|
} |
896
|
|
|
|
897
|
|
|
/** |
898
|
|
|
* 配送メモ |
899
|
|
|
* 注文管理ツールで入力された出荷の配送希望メモ入力内容です。 |
900
|
|
|
* max:500byte |
901
|
|
|
* |
902
|
|
|
* @param string $shipNotes |
903
|
|
|
* @return self |
904
|
|
|
*/ |
905
|
|
|
public function setShipNotes(string $shipNotes): self |
906
|
|
|
{ |
907
|
|
|
if (isset($this->params['Ship']['ShipNotes'])) { |
908
|
|
|
throw new LogicException('ShipNotes is already set.'); |
909
|
|
|
} |
910
|
|
|
$this->params['Ship']['ShipNotes'] = $shipNotes; |
911
|
|
|
|
912
|
|
|
return $this; |
913
|
|
|
} |
914
|
|
|
|
915
|
|
|
/** |
916
|
|
|
* 配送伝票番号1 |
917
|
|
|
* 注文管理ツールでセラーが入力、アップロードした配送会社の配送伝票番号です。注文管理ツールの画面上は1と2があります。 |
918
|
|
|
* max:30byte |
919
|
|
|
* |
920
|
|
|
* @param string $shipInvoiceNumber1 |
921
|
|
|
* @return self |
922
|
|
|
*/ |
923
|
|
|
public function setShipInvoiceNumber1(string $shipInvoiceNumber1): self |
924
|
|
|
{ |
925
|
|
|
if (isset($this->params['Ship']['ShipInvoiceNumber1'])) { |
926
|
|
|
throw new LogicException('ShipInvoiceNumber1 is already set.'); |
927
|
|
|
} |
928
|
|
|
$this->params['Ship']['ShipInvoiceNumber1'] = $shipInvoiceNumber1; |
929
|
|
|
|
930
|
|
|
return $this; |
931
|
|
|
} |
932
|
|
|
|
933
|
|
|
/** |
934
|
|
|
* 配送伝票番号2 |
935
|
|
|
* 注文管理ツールでセラーが入力、アップロードした配送会社の配送伝票番号です。注文管理ツールの画面上は1と2があります。 |
936
|
|
|
* max:30byte |
937
|
|
|
* |
938
|
|
|
* @param string $shipInvoiceNumber2 |
939
|
|
|
* @return self |
940
|
|
|
*/ |
941
|
|
|
public function setShipInvoiceNumber2(string $shipInvoiceNumber2): self |
942
|
|
|
{ |
943
|
|
|
if (isset($this->params['Ship']['ShipInvoiceNumber2'])) { |
944
|
|
|
throw new LogicException('ShipInvoiceNumber2 is already set.'); |
945
|
|
|
} |
946
|
|
|
$this->params['Ship']['ShipInvoiceNumber2'] = $shipInvoiceNumber2; |
947
|
|
|
|
948
|
|
|
return $this; |
949
|
|
|
} |
950
|
|
|
|
951
|
|
|
/** |
952
|
|
|
* 配送会社URL |
953
|
|
|
* アップロードした配送会社の配送伝票番号です. |
954
|
|
|
* max:100byte |
955
|
|
|
* |
956
|
|
|
* @param string $shipUrl |
957
|
|
|
* @return self |
958
|
|
|
*/ |
959
|
|
|
public function setShipUrl(string $shipUrl): self |
960
|
|
|
{ |
961
|
|
|
if (isset($this->params['Ship']['ShipUrl'])) { |
962
|
|
|
throw new LogicException('ShipUrl is already set.'); |
963
|
|
|
} |
964
|
|
|
$this->params['Ship']['ShipUrl'] = $shipUrl; |
965
|
|
|
|
966
|
|
|
return $this; |
967
|
|
|
} |
968
|
|
|
|
969
|
|
|
/** |
970
|
|
|
* きょうつく、あすつく |
971
|
|
|
* きょうつく注文、あすつく注文の場合設定 |
972
|
|
|
* |
973
|
|
|
* @param ArriveType $arriveType |
974
|
|
|
* @return self |
975
|
|
|
*/ |
976
|
|
View Code Duplication |
public function setArriveType(ArriveType $arriveType): self |
|
|
|
|
977
|
|
|
{ |
978
|
|
|
if (isset($this->params['Ship']['ArriveType'])) { |
979
|
|
|
throw new LogicException('ArriveType is already set.'); |
980
|
|
|
} |
981
|
|
|
$this->params['Ship']['ArriveType'] = $arriveType->getValue(); |
982
|
|
|
|
983
|
|
|
return $this; |
984
|
|
|
} |
985
|
|
|
|
986
|
|
|
/** |
987
|
|
|
* 出荷日 |
988
|
|
|
* 注文管理ツールで入力された出荷日です。 |
989
|
|
|
* format:YYYYMMDD |
990
|
|
|
* |
991
|
|
|
* @param \DateTimeImmutable $shipDate |
992
|
|
|
* @return self |
993
|
|
|
*/ |
994
|
|
View Code Duplication |
public function setShipDate(\DateTimeImmutable $shipDate): self |
|
|
|
|
995
|
|
|
{ |
996
|
|
|
if (isset($this->params['Ship']['ShipDate'])) { |
997
|
|
|
throw new LogicException('ShipDate is already set.'); |
998
|
|
|
} |
999
|
|
|
$this->params['Ship']['ShipDate'] = $shipDate->format('Ymd'); |
1000
|
|
|
|
1001
|
|
|
return $this; |
1002
|
|
|
} |
1003
|
|
|
|
1004
|
|
|
/** |
1005
|
|
|
* 出荷日 |
1006
|
|
|
* 注文管理ツールで入力された出荷日です。 |
1007
|
|
|
* format:YYYYMMDD |
1008
|
|
|
* |
1009
|
|
|
* @param \DateTimeImmutable $arrivalDate |
1010
|
|
|
* @return self |
1011
|
|
|
*/ |
1012
|
|
View Code Duplication |
public function setArrivalDate(\DateTimeImmutable $arrivalDate): self |
|
|
|
|
1013
|
|
|
{ |
1014
|
|
|
if (isset($this->params['Ship']['ArrivalDate'])) { |
1015
|
|
|
throw new LogicException('ArrivalDate is already set.'); |
1016
|
|
|
} |
1017
|
|
|
$this->params['Ship']['ArrivalDate'] = $arrivalDate->format('Ymd'); |
1018
|
|
|
|
1019
|
|
|
return $this; |
1020
|
|
|
} |
1021
|
|
|
|
1022
|
|
|
/** |
1023
|
|
|
* ギフト包装有無 |
1024
|
|
|
* ※モバイル支払いの場合、ギフト包装の変更はできません。 |
1025
|
|
|
* キーなし : カートに設定なし |
1026
|
|
|
* false : ギフト包装無し |
1027
|
|
|
* true : ギフト包装有り |
1028
|
|
|
* max:5byte |
1029
|
|
|
* |
1030
|
|
|
* @param bool $needGiftWrap |
1031
|
|
|
* @return self |
1032
|
|
|
*/ |
1033
|
|
|
public function setNeedGiftWrap(bool $needGiftWrap): self |
1034
|
|
|
{ |
1035
|
|
|
if (isset($this->params['Ship']['NeedGiftWrap'])) { |
1036
|
|
|
throw new LogicException('NeedGiftWrap is already set.'); |
1037
|
|
|
} |
1038
|
|
|
$this->params['Ship']['NeedGiftWrap'] = $needGiftWrap ? 'true' : 'false'; |
1039
|
|
|
|
1040
|
|
|
return $this; |
1041
|
|
|
} |
1042
|
|
|
|
1043
|
|
|
/** |
1044
|
|
|
* ギフト包装の種類 |
1045
|
|
|
* max:30byte |
1046
|
|
|
* |
1047
|
|
|
* @param string $giftWrapType |
1048
|
|
|
* @return self |
1049
|
|
|
*/ |
1050
|
|
|
public function setGiftWrapType(string $giftWrapType): self |
1051
|
|
|
{ |
1052
|
|
|
if (isset($this->params['Ship']['GiftWrapType'])) { |
1053
|
|
|
throw new LogicException('GiftWrapType is already set.'); |
1054
|
|
|
} |
1055
|
|
|
$this->params['Ship']['GiftWrapType'] = $giftWrapType; |
1056
|
|
|
|
1057
|
|
|
return $this; |
1058
|
|
|
} |
1059
|
|
|
|
1060
|
|
|
/** |
1061
|
|
|
* ギフトメッセージ |
1062
|
|
|
* max:297byte |
1063
|
|
|
* |
1064
|
|
|
* @param string $giftWrapMessage |
1065
|
|
|
* @return self |
1066
|
|
|
*/ |
1067
|
|
|
public function setGiftWrapMessage(string $giftWrapMessage): self |
1068
|
|
|
{ |
1069
|
|
|
if (isset($this->params['Ship']['GiftWrapMessage'])) { |
1070
|
|
|
throw new LogicException('GiftWrapMessage is already set.'); |
1071
|
|
|
} |
1072
|
|
|
$this->params['Ship']['GiftWrapMessage'] = $giftWrapMessage; |
1073
|
|
|
|
1074
|
|
|
return $this; |
1075
|
|
|
} |
1076
|
|
|
|
1077
|
|
|
/** |
1078
|
|
|
* のしの有無 |
1079
|
|
|
* キーなし : カートに設定なし |
1080
|
|
|
* false : のし無し |
1081
|
|
|
* true : のし有り |
1082
|
|
|
* |
1083
|
|
|
* @param bool $needGiftWrapPaper |
1084
|
|
|
* @return self |
1085
|
|
|
*/ |
1086
|
|
|
public function setNeedGiftWrapPaper(bool $needGiftWrapPaper): self |
1087
|
|
|
{ |
1088
|
|
|
if (isset($this->params['Ship']['NeedGiftWrapPaper'])) { |
1089
|
|
|
throw new LogicException('NeedGiftWrapPaper is already set.'); |
1090
|
|
|
} |
1091
|
|
|
$this->params['Ship']['NeedGiftWrapPaper'] = $needGiftWrapPaper ? '1' : '0'; |
1092
|
|
|
|
1093
|
|
|
return $this; |
1094
|
|
|
} |
1095
|
|
|
|
1096
|
|
|
/** |
1097
|
|
|
* のし種類 |
1098
|
|
|
* max:30byte |
1099
|
|
|
* |
1100
|
|
|
* @param string $giftWrapPaperType |
1101
|
|
|
* @return self |
1102
|
|
|
*/ |
1103
|
|
|
public function setGiftWrapPaperType(string $giftWrapPaperType): self |
1104
|
|
|
{ |
1105
|
|
|
if (isset($this->params['Ship']['GiftWrapPaperType'])) { |
1106
|
|
|
throw new LogicException('GiftWrapPaperType is already set.'); |
1107
|
|
|
} |
1108
|
|
|
$this->params['Ship']['GiftWrapPaperType'] = $giftWrapPaperType; |
1109
|
|
|
|
1110
|
|
|
return $this; |
1111
|
|
|
} |
1112
|
|
|
|
1113
|
|
|
/** |
1114
|
|
|
* 名入れ(メッセージ) |
1115
|
|
|
* max:297byte |
1116
|
|
|
* |
1117
|
|
|
* @param string $giftWrapName |
1118
|
|
|
* @return self |
1119
|
|
|
*/ |
1120
|
|
|
public function setGiftWrapName(string $giftWrapName): self |
1121
|
|
|
{ |
1122
|
|
|
if (isset($this->params['Ship']['GiftWrapName'])) { |
1123
|
|
|
throw new LogicException('GiftWrapName is already set.'); |
1124
|
|
|
} |
1125
|
|
|
$this->params['Ship']['GiftWrapName'] = $giftWrapName; |
1126
|
|
|
|
1127
|
|
|
return $this; |
1128
|
|
|
} |
1129
|
|
|
|
1130
|
|
|
/** |
1131
|
|
|
* お届け先名前 |
1132
|
|
|
* max:297byte |
1133
|
|
|
* |
1134
|
|
|
* @param string $shipFirstName |
1135
|
|
|
* @return self |
1136
|
|
|
*/ |
1137
|
|
|
public function setShipFirstName(string $shipFirstName): self |
1138
|
|
|
{ |
1139
|
|
|
if (isset($this->params['Ship']['ShipFirstName'])) { |
1140
|
|
|
throw new LogicException('ShipFirstName is already set.'); |
1141
|
|
|
} |
1142
|
|
|
$this->params['Ship']['ShipFirstName'] = $shipFirstName; |
1143
|
|
|
|
1144
|
|
|
return $this; |
1145
|
|
|
} |
1146
|
|
|
|
1147
|
|
|
/** |
1148
|
|
|
* お届け先名前 |
1149
|
|
|
* max:297byte |
1150
|
|
|
* |
1151
|
|
|
* @param string $shipFirstNameKana |
1152
|
|
|
* @return self |
1153
|
|
|
*/ |
1154
|
|
|
public function setShipFirstNameKana(string $shipFirstNameKana): self |
1155
|
|
|
{ |
1156
|
|
|
if (isset($this->params['Ship']['ShipFirstNameKana'])) { |
1157
|
|
|
throw new LogicException('ShipFirstNameKana is already set.'); |
1158
|
|
|
} |
1159
|
|
|
$this->params['Ship']['ShipFirstNameKana'] = $shipFirstNameKana; |
1160
|
|
|
|
1161
|
|
|
return $this; |
1162
|
|
|
} |
1163
|
|
|
|
1164
|
|
|
/** |
1165
|
|
|
* お届け先名字 |
1166
|
|
|
* max:297byte |
1167
|
|
|
* |
1168
|
|
|
* @param string $shipLastName |
1169
|
|
|
* @return self |
1170
|
|
|
*/ |
1171
|
|
|
public function setShipLastName(string $shipLastName): self |
1172
|
|
|
{ |
1173
|
|
|
if (isset($this->params['Ship']['ShipLastName'])) { |
1174
|
|
|
throw new LogicException('ShipLastName is already set.'); |
1175
|
|
|
} |
1176
|
|
|
$this->params['Ship']['ShipLastName'] = $shipLastName; |
1177
|
|
|
|
1178
|
|
|
return $this; |
1179
|
|
|
} |
1180
|
|
|
|
1181
|
|
|
/** |
1182
|
|
|
* お届け先名字カナ |
1183
|
|
|
* max:297byte |
1184
|
|
|
* |
1185
|
|
|
* @param string $shipLastNameKana |
1186
|
|
|
* @return self |
1187
|
|
|
*/ |
1188
|
|
|
public function setShipLastNameKana(string $shipLastNameKana): self |
1189
|
|
|
{ |
1190
|
|
|
if (isset($this->params['Ship']['ShipLastNameKana'])) { |
1191
|
|
|
throw new LogicException('ShipLastNameKana is already set.'); |
1192
|
|
|
} |
1193
|
|
|
$this->params['Ship']['ShipLastNameKana'] = $shipLastNameKana; |
1194
|
|
|
|
1195
|
|
|
return $this; |
1196
|
|
|
} |
1197
|
|
|
|
1198
|
|
|
/** |
1199
|
|
|
* お届け先郵便番号 |
1200
|
|
|
* max:10byte |
1201
|
|
|
* |
1202
|
|
|
* @param string $shipZipCode |
1203
|
|
|
* @return self |
1204
|
|
|
*/ |
1205
|
|
|
public function setShipZipCode(string $shipZipCode): self |
1206
|
|
|
{ |
1207
|
|
|
if (isset($this->params['Ship']['ShipZipCode'])) { |
1208
|
|
|
throw new LogicException('ShipZipCode is already set.'); |
1209
|
|
|
} |
1210
|
|
|
$this->params['Ship']['ShipZipCode'] = $shipZipCode; |
1211
|
|
|
|
1212
|
|
|
return $this; |
1213
|
|
|
} |
1214
|
|
|
|
1215
|
|
|
/** |
1216
|
|
|
* お届け先都道府県 |
1217
|
|
|
* 海外の場合は「その他」として保存します。 |
1218
|
|
|
* max:12byte |
1219
|
|
|
* |
1220
|
|
|
* @param string $shipPrefecture |
1221
|
|
|
* @return self |
1222
|
|
|
*/ |
1223
|
|
|
public function setShipPrefecture(string $shipPrefecture): self |
1224
|
|
|
{ |
1225
|
|
|
if (isset($this->params['Ship']['ShipPrefecture'])) { |
1226
|
|
|
throw new LogicException('ShipPrefecture is already set.'); |
1227
|
|
|
} |
1228
|
|
|
$this->params['Ship']['ShipPrefecture'] = $shipPrefecture; |
1229
|
|
|
|
1230
|
|
|
return $this; |
1231
|
|
|
} |
1232
|
|
|
|
1233
|
|
|
/** |
1234
|
|
|
* お届け先都道府県フリガナ |
1235
|
|
|
* max:18byte |
1236
|
|
|
* |
1237
|
|
|
* @param string $shipPrefectureKana |
1238
|
|
|
* @return self |
1239
|
|
|
*/ |
1240
|
|
|
public function setShipPrefectureKana(string $shipPrefectureKana): self |
1241
|
|
|
{ |
1242
|
|
|
if (isset($this->params['Ship']['ShipPrefectureKana'])) { |
1243
|
|
|
throw new LogicException('ShipPrefectureKana is already set.'); |
1244
|
|
|
} |
1245
|
|
|
$this->params['Ship']['ShipPrefectureKana'] = $shipPrefectureKana; |
1246
|
|
|
|
1247
|
|
|
return $this; |
1248
|
|
|
} |
1249
|
|
|
|
1250
|
|
|
/** |
1251
|
|
|
* お届け先市区郡 |
1252
|
|
|
* max:297byte |
1253
|
|
|
* |
1254
|
|
|
* @param string $shipCity |
1255
|
|
|
* @return self |
1256
|
|
|
*/ |
1257
|
|
|
public function setShipCity(string $shipCity): self |
1258
|
|
|
{ |
1259
|
|
|
if (isset($this->params['Ship']['ShipCity'])) { |
1260
|
|
|
throw new LogicException('ShipCity is already set.'); |
1261
|
|
|
} |
1262
|
|
|
$this->params['Ship']['ShipCity'] = $shipCity; |
1263
|
|
|
|
1264
|
|
|
return $this; |
1265
|
|
|
} |
1266
|
|
|
|
1267
|
|
|
/** |
1268
|
|
|
* お届け先市区郡フリガナ |
1269
|
|
|
* max:297byte |
1270
|
|
|
* |
1271
|
|
|
* @param string $shipCityKana |
1272
|
|
|
* @return self |
1273
|
|
|
*/ |
1274
|
|
|
public function setShipCityKana(string $shipCityKana): self |
1275
|
|
|
{ |
1276
|
|
|
if (isset($this->params['Ship']['ShipCityKana'])) { |
1277
|
|
|
throw new LogicException('ShipCityKana is already set.'); |
1278
|
|
|
} |
1279
|
|
|
$this->params['Ship']['ShipCityKana'] = $shipCityKana; |
1280
|
|
|
|
1281
|
|
|
return $this; |
1282
|
|
|
} |
1283
|
|
|
|
1284
|
|
|
/** |
1285
|
|
|
* お届け先住所1 |
1286
|
|
|
* max:297byte |
1287
|
|
|
* |
1288
|
|
|
* @param string $shipAddress1 |
1289
|
|
|
* @return self |
1290
|
|
|
*/ |
1291
|
|
|
public function setShipAddress1(string $shipAddress1): self |
1292
|
|
|
{ |
1293
|
|
|
if (isset($this->params['Ship']['ShipAddress1'])) { |
1294
|
|
|
throw new LogicException('ShipAddress1 is already set.'); |
1295
|
|
|
} |
1296
|
|
|
$this->params['Ship']['ShipAddress1'] = $shipAddress1; |
1297
|
|
|
|
1298
|
|
|
return $this; |
1299
|
|
|
} |
1300
|
|
|
|
1301
|
|
|
/** |
1302
|
|
|
* お届け先住所1フリガナ |
1303
|
|
|
* max:297byte |
1304
|
|
|
* |
1305
|
|
|
* @param string $shipAddress1Kana |
1306
|
|
|
* @return self |
1307
|
|
|
*/ |
1308
|
|
|
public function setShipAddress1Kana(string $shipAddress1Kana): self |
1309
|
|
|
{ |
1310
|
|
|
if (isset($this->params['Ship']['ShipAddress1Kana'])) { |
1311
|
|
|
throw new LogicException('ShipAddress1Kana is already set.'); |
1312
|
|
|
} |
1313
|
|
|
$this->params['Ship']['ShipAddress1Kana'] = $shipAddress1Kana; |
1314
|
|
|
|
1315
|
|
|
return $this; |
1316
|
|
|
} |
1317
|
|
|
|
1318
|
|
|
/** |
1319
|
|
|
* お届け先住所2 |
1320
|
|
|
* max:297byte |
1321
|
|
|
* |
1322
|
|
|
* @param string $shipAddress2 |
1323
|
|
|
* @return self |
1324
|
|
|
*/ |
1325
|
|
|
public function setShipAddress2(string $shipAddress2): self |
1326
|
|
|
{ |
1327
|
|
|
if (isset($this->params['Ship']['ShipAddress2'])) { |
1328
|
|
|
throw new LogicException('ShipAddress2 is already set.'); |
1329
|
|
|
} |
1330
|
|
|
$this->params['Ship']['ShipAddress2'] = $shipAddress2; |
1331
|
|
|
|
1332
|
|
|
return $this; |
1333
|
|
|
} |
1334
|
|
|
|
1335
|
|
|
/** |
1336
|
|
|
* お届け先住所2フリガナ |
1337
|
|
|
* max:297byte |
1338
|
|
|
* |
1339
|
|
|
* @param string $shipAddress2Kana |
1340
|
|
|
* @return self |
1341
|
|
|
*/ |
1342
|
|
|
public function setShipAddress2Kana(string $shipAddress2Kana): self |
1343
|
|
|
{ |
1344
|
|
|
if (isset($this->params['Ship']['ShipAddress2Kana'])) { |
1345
|
|
|
throw new LogicException('ShipAddress2Kana is already set.'); |
1346
|
|
|
} |
1347
|
|
|
$this->params['Ship']['ShipAddress2Kana'] = $shipAddress2Kana; |
1348
|
|
|
|
1349
|
|
|
return $this; |
1350
|
|
|
} |
1351
|
|
|
|
1352
|
|
|
/** |
1353
|
|
|
* お届け先電話番号 |
1354
|
|
|
* max:14byte |
1355
|
|
|
* |
1356
|
|
|
* @param string $shipPhoneNumber |
1357
|
|
|
* @return self |
1358
|
|
|
*/ |
1359
|
|
|
public function setShipPhoneNumber(string $shipPhoneNumber): self |
1360
|
|
|
{ |
1361
|
|
|
if (isset($this->params['Ship']['ShipPhoneNumber'])) { |
1362
|
|
|
throw new LogicException('ShipPhoneNumber is already set.'); |
1363
|
|
|
} |
1364
|
|
|
$this->params['Ship']['ShipPhoneNumber'] = $shipPhoneNumber; |
1365
|
|
|
|
1366
|
|
|
return $this; |
1367
|
|
|
} |
1368
|
|
|
|
1369
|
|
|
/** |
1370
|
|
|
* お届け先緊急連絡先 |
1371
|
|
|
* max:14byte |
1372
|
|
|
* |
1373
|
|
|
* @param string $shipEmgPhoneNumber |
1374
|
|
|
* @return self |
1375
|
|
|
*/ |
1376
|
|
|
public function setShipEmgPhoneNumber(string $shipEmgPhoneNumber): self |
1377
|
|
|
{ |
1378
|
|
|
if (isset($this->params['Ship']['ShipEmgPhoneNumber'])) { |
1379
|
|
|
throw new LogicException('ShipEmgPhoneNumber is already set.'); |
1380
|
|
|
} |
1381
|
|
|
$this->params['Ship']['ShipEmgPhoneNumber'] = $shipEmgPhoneNumber; |
1382
|
|
|
|
1383
|
|
|
return $this; |
1384
|
|
|
} |
1385
|
|
|
|
1386
|
|
|
/** |
1387
|
|
|
* お届け先所属1フィールド名 |
1388
|
|
|
* max:297byte |
1389
|
|
|
* |
1390
|
|
|
* @param string $shipSection1Field |
1391
|
|
|
* @return self |
1392
|
|
|
*/ |
1393
|
|
|
public function setShipSection1Field(string $shipSection1Field): self |
1394
|
|
|
{ |
1395
|
|
|
if (isset($this->params['Ship']['ShipSection1Field'])) { |
1396
|
|
|
throw new LogicException('ShipSection1Field is already set.'); |
1397
|
|
|
} |
1398
|
|
|
$this->params['Ship']['ShipSection1Field'] = $shipSection1Field; |
1399
|
|
|
|
1400
|
|
|
return $this; |
1401
|
|
|
} |
1402
|
|
|
|
1403
|
|
|
/** |
1404
|
|
|
* お届け先所属1入力情報 |
1405
|
|
|
* max:297byte |
1406
|
|
|
* |
1407
|
|
|
* @param string $shipSection1Value |
1408
|
|
|
* @return self |
1409
|
|
|
*/ |
1410
|
|
|
public function setShipSection1Value(string $shipSection1Value): self |
1411
|
|
|
{ |
1412
|
|
|
if (isset($this->params['Ship']['ShipSection1Value'])) { |
1413
|
|
|
throw new LogicException('ShipSection1Value is already set.'); |
1414
|
|
|
} |
1415
|
|
|
$this->params['Ship']['ShipSection1Value'] = $shipSection1Value; |
1416
|
|
|
|
1417
|
|
|
return $this; |
1418
|
|
|
} |
1419
|
|
|
|
1420
|
|
|
/** |
1421
|
|
|
* お届け先所属2フィールド名 |
1422
|
|
|
* max:297byte |
1423
|
|
|
* |
1424
|
|
|
* @param string $shipSection2Field |
1425
|
|
|
* @return self |
1426
|
|
|
*/ |
1427
|
|
|
public function setShipSection2Field(string $shipSection2Field): self |
1428
|
|
|
{ |
1429
|
|
|
if (isset($this->params['Ship']['ShipSection2Field'])) { |
1430
|
|
|
throw new LogicException('ShipSection2Field is already set.'); |
1431
|
|
|
} |
1432
|
|
|
$this->params['Ship']['ShipSection2Field'] = $shipSection2Field; |
1433
|
|
|
|
1434
|
|
|
return $this; |
1435
|
|
|
} |
1436
|
|
|
|
1437
|
|
|
/** |
1438
|
|
|
* お届け先所属2入力情報 |
1439
|
|
|
* max:297byte |
1440
|
|
|
* |
1441
|
|
|
* @param string $shipSection2Value |
1442
|
|
|
* @return self |
1443
|
|
|
*/ |
1444
|
|
|
public function setShipSection2Value(string $shipSection2Value): self |
1445
|
|
|
{ |
1446
|
|
|
if (isset($this->params['Ship']['ShipSection2Value'])) { |
1447
|
|
|
throw new LogicException('ShipSection2Value is already set.'); |
1448
|
|
|
} |
1449
|
|
|
$this->params['Ship']['ShipSection2Value'] = $shipSection2Value; |
1450
|
|
|
|
1451
|
|
|
return $this; |
1452
|
|
|
} |
1453
|
|
|
|
1454
|
|
|
/** |
1455
|
|
|
* 手数料 |
1456
|
|
|
* セラーが設定した手数料(代引き手数料など)、Yahoo!決済の決済手数料は別です。 |
1457
|
|
|
* max:10byte |
1458
|
|
|
* |
1459
|
|
|
* @param string $payCharge |
1460
|
|
|
* @return self |
1461
|
|
|
*/ |
1462
|
|
View Code Duplication |
public function setPayCharge(string $payCharge): self |
|
|
|
|
1463
|
|
|
{ |
1464
|
|
|
if (isset($this->params['Detail']['PayCharge'])) { |
1465
|
|
|
throw new LogicException('PayCharge is already set.'); |
1466
|
|
|
} |
1467
|
|
|
$this->params['Detail']['PayCharge'] = $payCharge; |
1468
|
|
|
|
1469
|
|
|
return $this; |
1470
|
|
|
} |
1471
|
|
|
|
1472
|
|
|
/** |
1473
|
|
|
* 送料 |
1474
|
|
|
* max:10byte |
1475
|
|
|
* |
1476
|
|
|
* @param string $shipCharge |
1477
|
|
|
* @return self |
1478
|
|
|
*/ |
1479
|
|
View Code Duplication |
public function setShipCharge(string $shipCharge): self |
|
|
|
|
1480
|
|
|
{ |
1481
|
|
|
if (isset($this->params['Detail']['ShipCharge'])) { |
1482
|
|
|
throw new LogicException('ShipCharge is already set.'); |
1483
|
|
|
} |
1484
|
|
|
$this->params['Detail']['ShipCharge'] = $shipCharge; |
1485
|
|
|
|
1486
|
|
|
return $this; |
1487
|
|
|
} |
1488
|
|
|
|
1489
|
|
|
/** |
1490
|
|
|
* ギフト包装料 |
1491
|
|
|
* max:10byte |
1492
|
|
|
* |
1493
|
|
|
* @param string $giftWrapCharge |
1494
|
|
|
* @return self |
1495
|
|
|
*/ |
1496
|
|
View Code Duplication |
public function setGiftWrapCharge(string $giftWrapCharge): self |
|
|
|
|
1497
|
|
|
{ |
1498
|
|
|
if (isset($this->params['Detail']['GiftWrapCharge'])) { |
1499
|
|
|
throw new LogicException('GiftWrapCharge is already set.'); |
1500
|
|
|
} |
1501
|
|
|
$this->params['Detail']['GiftWrapCharge'] = $giftWrapCharge; |
1502
|
|
|
|
1503
|
|
|
return $this; |
1504
|
|
|
} |
1505
|
|
|
|
1506
|
|
|
/** |
1507
|
|
|
* 値引き |
1508
|
|
|
* max:10byte |
1509
|
|
|
* |
1510
|
|
|
* @param string $discount |
1511
|
|
|
* @return self |
1512
|
|
|
*/ |
1513
|
|
View Code Duplication |
public function setDiscount(string $discount): self |
|
|
|
|
1514
|
|
|
{ |
1515
|
|
|
if (isset($this->params['Detail']['Discount'])) { |
1516
|
|
|
throw new LogicException('Discount is already set.'); |
1517
|
|
|
} |
1518
|
|
|
$this->params['Detail']['Discount'] = $discount; |
1519
|
|
|
|
1520
|
|
|
return $this; |
1521
|
|
|
} |
1522
|
|
|
|
1523
|
|
|
/** |
1524
|
|
|
* 調整額 |
1525
|
|
|
* マイナスの値も許容、その場合は -(10byte) が許容最大 |
1526
|
|
|
* max:10byte |
1527
|
|
|
* |
1528
|
|
|
* @param string $adjustments |
1529
|
|
|
* @return self |
1530
|
|
|
*/ |
1531
|
|
View Code Duplication |
public function setAdjustments(string $adjustments): self |
|
|
|
|
1532
|
|
|
{ |
1533
|
|
|
if (isset($this->params['Detail']['Adjustments'])) { |
1534
|
|
|
throw new LogicException('Adjustments is already set.'); |
1535
|
|
|
} |
1536
|
|
|
$this->params['Detail']['Adjustments'] = $adjustments; |
1537
|
|
|
|
1538
|
|
|
return $this; |
1539
|
|
|
} |
1540
|
|
|
|
1541
|
|
|
/** |
1542
|
|
|
* 商品LineID |
1543
|
|
|
* 商品情報を更新する際は必須です。 |
1544
|
|
|
* |
1545
|
|
|
* @param string $lineId |
1546
|
|
|
* @return self |
1547
|
|
|
*/ |
1548
|
|
|
public function setLineId(string $lineId): self |
1549
|
|
|
{ |
1550
|
|
|
if (isset($this->params['Item']['LineId'])) { |
1551
|
|
|
throw new LogicException('LineId is already set.'); |
1552
|
|
|
} |
1553
|
|
|
$this->params['Item']['LineId'] = $lineId; |
1554
|
|
|
|
1555
|
|
|
return $this; |
1556
|
|
|
} |
1557
|
|
|
|
1558
|
|
|
/** |
1559
|
|
|
* 商品ごとの数量 |
1560
|
|
|
* max:3byte |
1561
|
|
|
* |
1562
|
|
|
* @param string $quantity |
1563
|
|
|
* @return self |
1564
|
|
|
*/ |
1565
|
|
|
public function setQuantity(string $quantity): self |
1566
|
|
|
{ |
1567
|
|
|
if (isset($this->params['Item']['Quantity'])) { |
1568
|
|
|
throw new LogicException('Quantity is already set.'); |
1569
|
|
|
} |
1570
|
|
|
$this->params['Item']['Quantity'] = $quantity; |
1571
|
|
|
|
1572
|
|
|
return $this; |
1573
|
|
|
} |
1574
|
|
|
|
1575
|
|
|
/** |
1576
|
|
|
* 発売日 |
1577
|
|
|
* 発売日の入力がある場合です。 |
1578
|
|
|
* 発売日>注文日の場合、予約注文として扱います。 |
1579
|
|
|
* format:YYYYMMDD |
1580
|
|
|
* |
1581
|
|
|
* @param \DateTimeImmutable $releaseDate |
1582
|
|
|
* @return self |
1583
|
|
|
*/ |
1584
|
|
View Code Duplication |
public function setReleaseDate(\DateTimeImmutable $releaseDate): self |
|
|
|
|
1585
|
|
|
{ |
1586
|
|
|
if (isset($this->params['Item']['ReleaseDate'])) { |
1587
|
|
|
throw new LogicException('ReleaseDate is already set.'); |
1588
|
|
|
} |
1589
|
|
|
$this->params['Item']['ReleaseDate'] = $releaseDate->format('Ymd'); |
1590
|
|
|
|
1591
|
|
|
return $this; |
1592
|
|
|
} |
1593
|
|
|
|
1594
|
|
|
} |
1595
|
|
|
|
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.