async-payjp-core 0.0.1

Payjp SDK based on arlyon/async-stripe
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
use payjp_client_core::{PayjpClient, BlockingClient, PayjpRequest, RequestBuilder, PayjpMethod};

#[derive(Copy,Clone,Debug,)]#[derive(serde::Serialize)]
 struct ListCustomerBuilder {
#[serde(skip_serializing_if = "Option::is_none")]
 limit: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
 offset: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
 since: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
 until: Option<i64>,

}
impl ListCustomerBuilder {
     fn new() -> Self {
    Self {
        limit: None,offset: None,since: None,until: None,
    }
}

}
            /// 生成した顧客情報のリストを取得します。リストは、直近で生成された順番に取得されます。.
#[derive(Clone,Debug,)]#[derive(serde::Serialize)]
pub struct ListCustomer {
 inner: ListCustomerBuilder,

}
impl ListCustomer {
    /// Construct a new `ListCustomer`.
pub fn new() -> Self {
    Self {
        inner: ListCustomerBuilder::new()
    }
}
    /// 取得するデータ数の最大値(1~100まで)。指定がない場合は 10 となる。
pub fn limit(mut self, limit: impl Into<i64>) -> Self {
    self.inner.limit = Some(limit.into());
    self
}
    /// 基準点からのデータ取得を行う開始位置。指定がない場合は 0 となる。
pub fn offset(mut self, offset: impl Into<i64>) -> Self {
    self.inner.offset = Some(offset.into());
    self
}
    /// ここに指定したタイムスタンプ以降に作成されたデータを取得
pub fn since(mut self, since: impl Into<i64>) -> Self {
    self.inner.since = Some(since.into());
    self
}
    /// ここに指定したタイムスタンプ以前に作成されたデータを取得
pub fn until(mut self, until: impl Into<i64>) -> Self {
    self.inner.until = Some(until.into());
    self
}

}
    impl Default for ListCustomer {
    fn default() -> Self {
        Self::new()
    }
}impl ListCustomer {
    /// Send the request and return the deserialized response.
    pub async fn send<C: PayjpClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send(client).await
    }

    /// Send the request and return the deserialized response, blocking until completion.
    pub fn send_blocking<C: BlockingClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send_blocking(client)
    }

    pub fn paginate(&self) -> payjp_client_core::ListPaginator<payjp_types::List<payjp_core::Customer>> {
    
    payjp_client_core::ListPaginator::new_list("/customers", &self.inner)
}

}

impl PayjpRequest for ListCustomer {
    type Output = payjp_types::List<payjp_core::Customer>;

    fn build(&self) -> RequestBuilder {
    RequestBuilder::new(PayjpMethod::Get, "/customers").query(&self.inner)
}

}
#[derive(Clone,Debug,serde::Serialize)]
 struct CreateCustomerBuilder {
#[serde(skip_serializing_if = "Option::is_none")]
 card: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
 description: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
 email: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
 id: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
 metadata: Option<std::collections::HashMap<String, String>>,

}
impl CreateCustomerBuilder {
     fn new() -> Self {
    Self {
        card: None,description: None,email: None,id: None,metadata: None,
    }
}

}
            /// メールアドレスやIDなどを指定して顧客を作成します。作成と同時にカード情報を登録する場合、トークンIDを指定します。.
#[derive(Clone,Debug,)]#[derive(serde::Serialize)]
pub struct CreateCustomer {
 inner: CreateCustomerBuilder,

}
impl CreateCustomer {
    /// Construct a new `CreateCustomer`.
pub fn new() -> Self {
    Self {
        inner: CreateCustomerBuilder::new()
    }
}
    /// トークンID(トークンIDを指定)
pub fn card(mut self, card: impl Into<String>) -> Self {
    self.inner.card = Some(card.into());
    self
}
    /// 概要
pub fn description(mut self, description: impl Into<String>) -> Self {
    self.inner.description = Some(description.into());
    self
}
    /// メールアドレス
pub fn email(mut self, email: impl Into<String>) -> Self {
    self.inner.email = Some(email.into());
    self
}
    /// 顧客ID
pub fn id(mut self, id: impl Into<String>) -> Self {
    self.inner.id = Some(id.into());
    self
}
pub fn metadata(mut self,
                metadata: impl Into<std::collections::HashMap<String, String>>
) -> Self {
    self.inner.metadata = Some(metadata.into());
    self
}

}
    impl Default for CreateCustomer {
    fn default() -> Self {
        Self::new()
    }
}impl CreateCustomer {
    /// Send the request and return the deserialized response.
    pub async fn send<C: PayjpClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send(client).await
    }

    /// Send the request and return the deserialized response, blocking until completion.
    pub fn send_blocking<C: BlockingClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send_blocking(client)
    }

    
}

impl PayjpRequest for CreateCustomer {
    type Output = payjp_core::Customer;

    fn build(&self) -> RequestBuilder {
    RequestBuilder::new(PayjpMethod::Post, "/customers").form(&self.inner)
}

}
    /// 生成した顧客情報を取得します。
#[derive(Clone,Debug,)]#[derive(serde::Serialize)]
pub struct RetrieveCustomer {
 customer: payjp_core::CustomerId,

}
impl RetrieveCustomer {
    /// Construct a new `RetrieveCustomer`.
pub fn new(customer:impl Into<payjp_core::CustomerId>) -> Self {
    Self {
        customer: customer.into(),
    }
}

}
    impl RetrieveCustomer {
    /// Send the request and return the deserialized response.
    pub async fn send<C: PayjpClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send(client).await
    }

    /// Send the request and return the deserialized response, blocking until completion.
    pub fn send_blocking<C: BlockingClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send_blocking(client)
    }

    
}

impl PayjpRequest for RetrieveCustomer {
    type Output = payjp_core::Customer;

    fn build(&self) -> RequestBuilder {
    let customer = &self.customer;
RequestBuilder::new(PayjpMethod::Get, format!("/customers/{customer}"))
}

}
#[derive(Clone,Debug,)]#[derive(serde::Serialize)]
 struct UpdateCustomerBuilder {
#[serde(skip_serializing_if = "Option::is_none")]
 card: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
 default_card: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
 description: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
 email: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
metadata: Option<std::collections::HashMap<String, String>>,

}
impl UpdateCustomerBuilder {
     fn new() -> Self {
    Self {
        card: None,default_card: None,description: None,email: None,metadata: None,
    }
}

}
            /// 生成した顧客情報を更新したり、新たなカードを顧客に追加することができます。.
#[derive(Clone,Debug,)]#[derive(serde::Serialize)]
pub struct UpdateCustomer {
 inner: UpdateCustomerBuilder,
 customer: payjp_core::CustomerId,

}
impl UpdateCustomer {
    /// Construct a new `UpdateCustomer`.
pub fn new(customer:impl Into<payjp_core::CustomerId>) -> Self {
    Self {
        customer: customer.into(),inner: UpdateCustomerBuilder::new()
    }
}
    /// トークンID(トークンIDを指定)
pub fn card(mut self, card: impl Into<String>) -> Self {
    self.inner.card = Some(card.into());
    self
}
    /// 保持しているカードID
pub fn default_card(mut self, default_card: impl Into<String>) -> Self {
    self.inner.default_card = Some(default_card.into());
    self
}
    /// 概要
pub fn description(mut self, description: impl Into<String>) -> Self {
    self.inner.description = Some(description.into());
    self
}
    /// メールアドレス
pub fn email(mut self, email: impl Into<String>) -> Self {
    self.inner.email = Some(email.into());
    self
}
pub fn metadata(mut self,
                metadata: impl Into<std::collections::HashMap<String, String>>
) -> Self {
    self.inner.metadata = Some(metadata.into());
    self
}

}
    impl UpdateCustomer {
    /// Send the request and return the deserialized response.
    pub async fn send<C: PayjpClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send(client).await
    }

    /// Send the request and return the deserialized response, blocking until completion.
    pub fn send_blocking<C: BlockingClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send_blocking(client)
    }

    
}

impl PayjpRequest for UpdateCustomer {
    type Output = payjp_core::Customer;

    fn build(&self) -> RequestBuilder {
    let customer = &self.customer;
RequestBuilder::new(PayjpMethod::Post, format!("/customers/{customer}")).form(&self.inner)
}

}
        /// 顧客を削除します。顧客に紐付く定期課金がある場合は、同時にそれらの定期課金も削除されます。.
#[derive(Clone,Debug,)]#[derive(serde::Serialize)]
pub struct DeleteCustomer {
 customer: payjp_core::CustomerId,

}
impl DeleteCustomer {
    /// Construct a new `DeleteCustomer`.
pub fn new(customer:impl Into<payjp_core::CustomerId>) -> Self {
    Self {
        customer: customer.into(),
    }
}

}
    impl DeleteCustomer {
    /// Send the request and return the deserialized response.
    pub async fn send<C: PayjpClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send(client).await
    }

    /// Send the request and return the deserialized response, blocking until completion.
    pub fn send_blocking<C: BlockingClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send_blocking(client)
    }

    
}

impl PayjpRequest for DeleteCustomer {
    type Output = payjp_shared::DeleteResponse;

    fn build(&self) -> RequestBuilder {
    let customer = &self.customer;
RequestBuilder::new(PayjpMethod::Delete, format!("/customers/{customer}"))
}

}
#[derive(Copy,Clone,Debug,)]#[derive(serde::Serialize)]
 struct ListCardCustomerBuilder {
#[serde(skip_serializing_if = "Option::is_none")]
 limit: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
 offset: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
 since: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
 until: Option<i64>,

}
impl ListCardCustomerBuilder {
     fn new() -> Self {
    Self {
        limit: None,offset: None,since: None,until: None,
    }
}

}
            /// 顧客の保持しているカードリストを取得します。リストは、直近で生成された順番に取得されます。.
#[derive(Clone,Debug,)]#[derive(serde::Serialize)]
pub struct ListCardCustomer {
 inner: ListCardCustomerBuilder,
 customer: payjp_core::CustomerId,

}
impl ListCardCustomer {
    /// Construct a new `ListCardCustomer`.
pub fn new(customer:impl Into<payjp_core::CustomerId>) -> Self {
    Self {
        customer: customer.into(),inner: ListCardCustomerBuilder::new()
    }
}
    /// 取得するデータ数の最大値(1~100まで)。指定がない場合は 10 となる。
pub fn limit(mut self, limit: impl Into<i64>) -> Self {
    self.inner.limit = Some(limit.into());
    self
}
    /// 基準点からのデータ取得を行う開始位置。指定がない場合は 0 となる。
pub fn offset(mut self, offset: impl Into<i64>) -> Self {
    self.inner.offset = Some(offset.into());
    self
}
    /// ここに指定したタイムスタンプ以降に作成されたデータを取得
pub fn since(mut self, since: impl Into<i64>) -> Self {
    self.inner.since = Some(since.into());
    self
}
    /// ここに指定したタイムスタンプ以前に作成されたデータを取得
pub fn until(mut self, until: impl Into<i64>) -> Self {
    self.inner.until = Some(until.into());
    self
}

}
    impl ListCardCustomer {
    /// Send the request and return the deserialized response.
    pub async fn send<C: PayjpClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send(client).await
    }

    /// Send the request and return the deserialized response, blocking until completion.
    pub fn send_blocking<C: BlockingClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send_blocking(client)
    }

    pub fn paginate(&self) -> payjp_client_core::ListPaginator<payjp_types::List<payjp_core::Card>> {
    let customer = &self.customer;

    payjp_client_core::ListPaginator::new_list(format!("/customers/{customer}/cards"), &self.inner)
}

}

impl PayjpRequest for ListCardCustomer {
    type Output = payjp_types::List<payjp_core::Card>;

    fn build(&self) -> RequestBuilder {
    let customer = &self.customer;
RequestBuilder::new(PayjpMethod::Get, format!("/customers/{customer}/cards")).query(&self.inner)
}

}
#[derive(Clone,Debug,)]#[derive(serde::Serialize)]
 struct CreateCardCustomerBuilder {
#[serde(skip_serializing_if = "Option::is_none")]
 card: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
 default: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
metadata: Option<std::collections::HashMap<String, String>>,

}
impl CreateCardCustomerBuilder {
     fn new() -> Self {
    Self {
        card: None,default: None,metadata: None,
    }
}

}
        /// トークンIDを指定して、新たにカードを追加します。
#[derive(Clone,Debug,)]#[derive(serde::Serialize)]
pub struct CreateCardCustomer {
 inner: CreateCardCustomerBuilder,
 customer: payjp_core::CustomerId,

}
impl CreateCardCustomer {
    /// Construct a new `CreateCardCustomer`.
pub fn new(customer:impl Into<payjp_core::CustomerId>) -> Self {
    Self {
        customer: customer.into(),inner: CreateCardCustomerBuilder::new()
    }
}
    /// トークンID
pub fn card(mut self, card: impl Into<String>) -> Self {
    self.inner.card = Some(card.into());
    self
}
    /// メイン利用のカードに設定するかどうか
pub fn default(mut self, default: impl Into<bool>) -> Self {
    self.inner.default = Some(default.into());
    self
}
pub fn metadata(mut self,
                metadata: impl Into<std::collections::HashMap<String, String>>,
) -> Self {
    self.inner.metadata = Some(metadata.into());
    self
}

}
    impl CreateCardCustomer {
    /// Send the request and return the deserialized response.
    pub async fn send<C: PayjpClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send(client).await
    }

    /// Send the request and return the deserialized response, blocking until completion.
    pub fn send_blocking<C: BlockingClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send_blocking(client)
    }

    
}

impl PayjpRequest for CreateCardCustomer {
    type Output = payjp_core::Card;

    fn build(&self) -> RequestBuilder {
    let customer = &self.customer;
RequestBuilder::new(PayjpMethod::Post, format!("/customers/{customer}/cards")).form(&self.inner)
}

}
    /// 顧客の特定のカード情報を取得します。
#[derive(Clone,Debug,)]#[derive(serde::Serialize)]
pub struct RetrieveCardCustomer {
 customer: payjp_core::CustomerId,
 card: String,

}
impl RetrieveCardCustomer {
    /// Construct a new `RetrieveCardCustomer`.
pub fn new(customer:impl Into<payjp_core::CustomerId>,card:impl Into<String>) -> Self {
    Self {
        customer: customer.into(),card: card.into(),
    }
}

}
    impl RetrieveCardCustomer {
    /// Send the request and return the deserialized response.
    pub async fn send<C: PayjpClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send(client).await
    }

    /// Send the request and return the deserialized response, blocking until completion.
    pub fn send_blocking<C: BlockingClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send_blocking(client)
    }

    
}

impl PayjpRequest for RetrieveCardCustomer {
    type Output = payjp_core::Card;

    fn build(&self) -> RequestBuilder {
    let customer = &self.customer;
let card = &self.card;
RequestBuilder::new(PayjpMethod::Get, format!("/customers/{customer}/cards/{card}"))
}

}
#[derive(Clone,Debug,)]#[derive(serde::Serialize)]
 struct UpdateCardCustomerBuilder {
#[serde(skip_serializing_if = "Option::is_none")]
 address_city: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
 address_line1: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
 address_line2: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
 address_state: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
 address_zip: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
 country: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
 email: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
metadata: Option<std::collections::HashMap<String, String>>,
#[serde(skip_serializing_if = "Option::is_none")]
 name: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
 phone: Option<String>,

}
impl UpdateCardCustomerBuilder {
     fn new() -> Self {
    Self {
        address_city: None,address_line1: None,address_line2: None,address_state: None,address_zip: None,country: None,email: None,metadata: None,name: None,phone: None,
    }
}

}
        /// 顧客の特定のカード情報を更新します。
#[derive(Clone,Debug,)]#[derive(serde::Serialize)]
pub struct UpdateCardCustomer {
 inner: UpdateCardCustomerBuilder,
 customer: payjp_core::CustomerId,
 card: String,

}
impl UpdateCardCustomer {
    /// Construct a new `UpdateCardCustomer`.
pub fn new(customer:impl Into<payjp_core::CustomerId>,card:impl Into<String>) -> Self {
    Self {
        customer: customer.into(),card: card.into(),inner: UpdateCardCustomerBuilder::new()
    }
}
    /// 市区町村
pub fn address_city(mut self, address_city: impl Into<String>) -> Self {
    self.inner.address_city = Some(address_city.into());
    self
}
    /// 番地など
pub fn address_line1(mut self, address_line1: impl Into<String>) -> Self {
    self.inner.address_line1 = Some(address_line1.into());
    self
}
    /// 建物名など
pub fn address_line2(mut self, address_line2: impl Into<String>) -> Self {
    self.inner.address_line2 = Some(address_line2.into());
    self
}
    /// 都道府県
pub fn address_state(mut self, address_state: impl Into<String>) -> Self {
    self.inner.address_state = Some(address_state.into());
    self
}
    /// 郵便番号
pub fn address_zip(mut self, address_zip: impl Into<String>) -> Self {
    self.inner.address_zip = Some(address_zip.into());
    self
}
    /// 2桁のISOコード(e.g. JP)
pub fn country(mut self, country: impl Into<String>) -> Self {
    self.inner.country = Some(country.into());
    self
}
    /// メールアドレス
pub fn email(mut self, email: impl Into<String>) -> Self {
    self.inner.email = Some(email.into());
    self
}
pub fn metadata(mut self,
                metadata: impl Into<std::collections::HashMap<String, String>>,
) -> Self {
    self.inner.metadata = Some(metadata.into());
    self
}
    /// カード保有者名
pub fn name(mut self, name: impl Into<String>) -> Self {
    self.inner.name = Some(name.into());
    self
}
    /// E.164形式の電話番号
pub fn phone(mut self, phone: impl Into<String>) -> Self {
    self.inner.phone = Some(phone.into());
    self
}

}
    impl UpdateCardCustomer {
    /// Send the request and return the deserialized response.
    pub async fn send<C: PayjpClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send(client).await
    }

    /// Send the request and return the deserialized response, blocking until completion.
    pub fn send_blocking<C: BlockingClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send_blocking(client)
    }

    
}

impl PayjpRequest for UpdateCardCustomer {
    type Output = payjp_core::Card;

    fn build(&self) -> RequestBuilder {
    let customer = &self.customer;
let card = &self.card;
RequestBuilder::new(PayjpMethod::Post, format!("/customers/{customer}/cards/{card}")).form(&self.inner)
}

}
    /// 顧客の特定のカードを削除します。
#[derive(Clone,Debug,)]#[derive(serde::Serialize)]
pub struct DeleteCardCustomer {
 customer: payjp_core::CustomerId,
 card: String,

}
impl DeleteCardCustomer {
    /// Construct a new `DeleteCardCustomer`.
pub fn new(customer:impl Into<payjp_core::CustomerId>,card:impl Into<String>) -> Self {
    Self {
        customer: customer.into(),card: card.into(),
    }
}

}
    impl DeleteCardCustomer {
    /// Send the request and return the deserialized response.
    pub async fn send<C: PayjpClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send(client).await
    }

    /// Send the request and return the deserialized response, blocking until completion.
    pub fn send_blocking<C: BlockingClient>(&self, client: &C) -> Result<<Self as PayjpRequest>::Output, C::Err> {
        self.customize().send_blocking(client)
    }

    
}

impl PayjpRequest for DeleteCardCustomer {
    type Output = payjp_shared::DeleteResponse;

    fn build(&self) -> RequestBuilder {
    let customer = &self.customer;
let card = &self.card;
RequestBuilder::new(PayjpMethod::Delete, format!("/customers/{customer}/cards/{card}"))
}

}