@sellout/models 0.0.63 → 0.0.64

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.
Files changed (48) hide show
  1. package/.dist/enums/OrderItemTypeEnum.d.ts +4 -0
  2. package/.dist/enums/OrderItemTypeEnum.js +10 -0
  3. package/.dist/enums/OrderItemTypeEnum.js.map +1 -0
  4. package/.dist/graphql/fragments/order.fragment.js +2 -0
  5. package/.dist/graphql/fragments/order.fragment.js.map +1 -1
  6. package/.dist/graphql/mutations/attachStripePaymentMethod.mutation.js +10 -1
  7. package/.dist/graphql/mutations/attachStripePaymentMethod.mutation.js.map +1 -1
  8. package/.dist/graphql/mutations/breakApartOrder.js +1 -8
  9. package/.dist/graphql/mutations/breakApartOrder.js.map +1 -1
  10. package/.dist/graphql/mutations/register.mutation.js +2 -9
  11. package/.dist/graphql/mutations/register.mutation.js.map +1 -1
  12. package/.dist/graphql/queries/order.query.js +1 -0
  13. package/.dist/graphql/queries/order.query.js.map +1 -1
  14. package/.dist/graphql/queries/publicEvent.query.js +1 -0
  15. package/.dist/graphql/queries/publicEvent.query.js.map +1 -1
  16. package/.dist/graphql/queries/userProfile.query.js +3 -2
  17. package/.dist/graphql/queries/userProfile.query.js.map +1 -1
  18. package/.dist/interfaces/ICreateOrderParams.d.ts +1 -2
  19. package/.dist/interfaces/IOrder.d.ts +0 -2
  20. package/.dist/interfaces/IOrder.js.map +1 -1
  21. package/.dist/interfaces/IStripeCustomer.d.ts +2 -2
  22. package/.dist/interfaces/IStripePaymentMethod.d.ts +10 -0
  23. package/.dist/interfaces/IStripePaymentMethod.js +3 -0
  24. package/.dist/interfaces/IStripePaymentMethod.js.map +1 -0
  25. package/.dist/schemas/Order.d.ts +0 -4
  26. package/.dist/schemas/Order.js +0 -4
  27. package/.dist/schemas/Order.js.map +1 -1
  28. package/.dist/sellout-proto.js +463 -116
  29. package/.dist/utils/PaymentUtil.js +6 -6
  30. package/.dist/utils/PaymentUtil.js.map +1 -1
  31. package/package.json +4 -4
  32. package/src/enums/OrderItemTypeEnum.ts +4 -0
  33. package/src/graphql/fragments/order.fragment.ts +2 -0
  34. package/src/graphql/mutations/attachStripePaymentMethod.mutation.ts +10 -1
  35. package/src/graphql/mutations/breakApartOrder.ts +1 -8
  36. package/src/graphql/mutations/register.mutation.ts +2 -9
  37. package/src/graphql/queries/order.query.ts +1 -0
  38. package/src/graphql/queries/publicEvent.query.ts +1 -0
  39. package/src/graphql/queries/userProfile.query.ts +3 -2
  40. package/src/interfaces/ICreateOrderParams.ts +1 -2
  41. package/src/interfaces/IOrder.ts +0 -2
  42. package/src/interfaces/IStripeCustomer.ts +2 -2
  43. package/src/interfaces/{IStripeSource.ts → IStripePaymentMethod.ts} +2 -2
  44. package/src/proto/order.proto +5 -5
  45. package/src/proto/stripe.proto +14 -3
  46. package/src/schemas/Order.ts +0 -4
  47. package/src/utils/PaymentUtil.ts +6 -6
  48. package/src/enums/OrderDeliveryMethodEnum.ts +0 -5
@@ -12428,7 +12428,6 @@ $root.Order = (function() {
12428
12428
  * @property {Array.<IOrderCustomField>|null} [customFields] Order customFields
12429
12429
  * @property {string|null} [refundReason] Order refundReason
12430
12430
  * @property {Array.<IPayment>|null} [payments] Order payments
12431
- * @property {string|null} [deliveryMethod] Order deliveryMethod
12432
12431
  */
12433
12432
 
12434
12433
  /**
@@ -12646,14 +12645,6 @@ $root.Order = (function() {
12646
12645
  */
12647
12646
  Order.prototype.payments = $util.emptyArray;
12648
12647
 
12649
- /**
12650
- * Order deliveryMethod.
12651
- * @member {string} deliveryMethod
12652
- * @memberof Order
12653
- * @instance
12654
- */
12655
- Order.prototype.deliveryMethod = "";
12656
-
12657
12648
  /**
12658
12649
  * Creates a new Order instance using the specified properties.
12659
12650
  * @function create
@@ -12734,8 +12725,6 @@ $root.Order = (function() {
12734
12725
  if (message.payments != null && message.payments.length)
12735
12726
  for (var i = 0; i < message.payments.length; ++i)
12736
12727
  $root.Payment.encode(message.payments[i], writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
12737
- if (message.deliveryMethod != null && Object.hasOwnProperty.call(message, "deliveryMethod"))
12738
- writer.uint32(/* id 24, wireType 2 =*/194).string(message.deliveryMethod);
12739
12728
  return writer;
12740
12729
  };
12741
12730
 
@@ -12858,9 +12847,6 @@ $root.Order = (function() {
12858
12847
  message.payments = [];
12859
12848
  message.payments.push($root.Payment.decode(reader, reader.uint32()));
12860
12849
  break;
12861
- case 24:
12862
- message.deliveryMethod = reader.string();
12863
- break;
12864
12850
  default:
12865
12851
  reader.skipType(tag & 7);
12866
12852
  break;
@@ -13010,9 +12996,6 @@ $root.Order = (function() {
13010
12996
  return "payments." + error;
13011
12997
  }
13012
12998
  }
13013
- if (message.deliveryMethod != null && message.hasOwnProperty("deliveryMethod"))
13014
- if (!$util.isString(message.deliveryMethod))
13015
- return "deliveryMethod: string expected";
13016
12999
  return null;
13017
13000
  };
13018
13001
 
@@ -13131,8 +13114,6 @@ $root.Order = (function() {
13131
13114
  message.payments[i] = $root.Payment.fromObject(object.payments[i]);
13132
13115
  }
13133
13116
  }
13134
- if (object.deliveryMethod != null)
13135
- message.deliveryMethod = String(object.deliveryMethod);
13136
13117
  return message;
13137
13118
  };
13138
13119
 
@@ -13176,7 +13157,6 @@ $root.Order = (function() {
13176
13157
  object.ipAddress = "";
13177
13158
  object.address = null;
13178
13159
  object.refundReason = "";
13179
- object.deliveryMethod = "";
13180
13160
  }
13181
13161
  if (message._id != null && message.hasOwnProperty("_id"))
13182
13162
  object._id = message._id;
@@ -13250,8 +13230,6 @@ $root.Order = (function() {
13250
13230
  for (var j = 0; j < message.payments.length; ++j)
13251
13231
  object.payments[j] = $root.Payment.toObject(message.payments[j], options);
13252
13232
  }
13253
- if (message.deliveryMethod != null && message.hasOwnProperty("deliveryMethod"))
13254
- object.deliveryMethod = message.deliveryMethod;
13255
13233
  return object;
13256
13234
  };
13257
13235
 
@@ -13286,6 +13264,7 @@ $root.OrderTicket = (function() {
13286
13264
  * @property {IRefund|null} [refund] OrderTicket refund
13287
13265
  * @property {IScan|null} [scan] OrderTicket scan
13288
13266
  * @property {string|null} [state] OrderTicket state
13267
+ * @property {string|null} [qrCodeUrl] OrderTicket qrCodeUrl
13289
13268
  */
13290
13269
 
13291
13270
  /**
@@ -13391,6 +13370,14 @@ $root.OrderTicket = (function() {
13391
13370
  */
13392
13371
  OrderTicket.prototype.state = "";
13393
13372
 
13373
+ /**
13374
+ * OrderTicket qrCodeUrl.
13375
+ * @member {string} qrCodeUrl
13376
+ * @memberof OrderTicket
13377
+ * @instance
13378
+ */
13379
+ OrderTicket.prototype.qrCodeUrl = "";
13380
+
13394
13381
  /**
13395
13382
  * Creates a new OrderTicket instance using the specified properties.
13396
13383
  * @function create
@@ -13437,6 +13424,8 @@ $root.OrderTicket = (function() {
13437
13424
  $root.Scan.encode(message.scan, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
13438
13425
  if (message.state != null && Object.hasOwnProperty.call(message, "state"))
13439
13426
  writer.uint32(/* id 10, wireType 2 =*/82).string(message.state);
13427
+ if (message.qrCodeUrl != null && Object.hasOwnProperty.call(message, "qrCodeUrl"))
13428
+ writer.uint32(/* id 11, wireType 2 =*/90).string(message.qrCodeUrl);
13440
13429
  return writer;
13441
13430
  };
13442
13431
 
@@ -13504,6 +13493,9 @@ $root.OrderTicket = (function() {
13504
13493
  case 10:
13505
13494
  message.state = reader.string();
13506
13495
  break;
13496
+ case 11:
13497
+ message.qrCodeUrl = reader.string();
13498
+ break;
13507
13499
  default:
13508
13500
  reader.skipType(tag & 7);
13509
13501
  break;
@@ -13576,6 +13568,9 @@ $root.OrderTicket = (function() {
13576
13568
  if (message.state != null && message.hasOwnProperty("state"))
13577
13569
  if (!$util.isString(message.state))
13578
13570
  return "state: string expected";
13571
+ if (message.qrCodeUrl != null && message.hasOwnProperty("qrCodeUrl"))
13572
+ if (!$util.isString(message.qrCodeUrl))
13573
+ return "qrCodeUrl: string expected";
13579
13574
  return null;
13580
13575
  };
13581
13576
 
@@ -13619,6 +13614,8 @@ $root.OrderTicket = (function() {
13619
13614
  }
13620
13615
  if (object.state != null)
13621
13616
  message.state = String(object.state);
13617
+ if (object.qrCodeUrl != null)
13618
+ message.qrCodeUrl = String(object.qrCodeUrl);
13622
13619
  return message;
13623
13620
  };
13624
13621
 
@@ -13647,6 +13644,7 @@ $root.OrderTicket = (function() {
13647
13644
  object.refund = null;
13648
13645
  object.scan = null;
13649
13646
  object.state = "";
13647
+ object.qrCodeUrl = "";
13650
13648
  }
13651
13649
  if (message._id != null && message.hasOwnProperty("_id"))
13652
13650
  object._id = message._id;
@@ -13670,6 +13668,8 @@ $root.OrderTicket = (function() {
13670
13668
  object.scan = $root.Scan.toObject(message.scan, options);
13671
13669
  if (message.state != null && message.hasOwnProperty("state"))
13672
13670
  object.state = message.state;
13671
+ if (message.qrCodeUrl != null && message.hasOwnProperty("qrCodeUrl"))
13672
+ object.qrCodeUrl = message.qrCodeUrl;
13673
13673
  return object;
13674
13674
  };
13675
13675
 
@@ -13702,6 +13702,7 @@ $root.OrderUpgrade = (function() {
13702
13702
  * @property {IRefund|null} [refund] OrderUpgrade refund
13703
13703
  * @property {IScan|null} [scan] OrderUpgrade scan
13704
13704
  * @property {string|null} [state] OrderUpgrade state
13705
+ * @property {string|null} [qrCodeUrl] OrderUpgrade qrCodeUrl
13705
13706
  */
13706
13707
 
13707
13708
  /**
@@ -13791,6 +13792,14 @@ $root.OrderUpgrade = (function() {
13791
13792
  */
13792
13793
  OrderUpgrade.prototype.state = "";
13793
13794
 
13795
+ /**
13796
+ * OrderUpgrade qrCodeUrl.
13797
+ * @member {string} qrCodeUrl
13798
+ * @memberof OrderUpgrade
13799
+ * @instance
13800
+ */
13801
+ OrderUpgrade.prototype.qrCodeUrl = "";
13802
+
13794
13803
  /**
13795
13804
  * Creates a new OrderUpgrade instance using the specified properties.
13796
13805
  * @function create
@@ -13833,6 +13842,8 @@ $root.OrderUpgrade = (function() {
13833
13842
  $root.Scan.encode(message.scan, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
13834
13843
  if (message.state != null && Object.hasOwnProperty.call(message, "state"))
13835
13844
  writer.uint32(/* id 8, wireType 2 =*/66).string(message.state);
13845
+ if (message.qrCodeUrl != null && Object.hasOwnProperty.call(message, "qrCodeUrl"))
13846
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.qrCodeUrl);
13836
13847
  return writer;
13837
13848
  };
13838
13849
 
@@ -13894,6 +13905,9 @@ $root.OrderUpgrade = (function() {
13894
13905
  case 8:
13895
13906
  message.state = reader.string();
13896
13907
  break;
13908
+ case 9:
13909
+ message.qrCodeUrl = reader.string();
13910
+ break;
13897
13911
  default:
13898
13912
  reader.skipType(tag & 7);
13899
13913
  break;
@@ -13960,6 +13974,9 @@ $root.OrderUpgrade = (function() {
13960
13974
  if (message.state != null && message.hasOwnProperty("state"))
13961
13975
  if (!$util.isString(message.state))
13962
13976
  return "state: string expected";
13977
+ if (message.qrCodeUrl != null && message.hasOwnProperty("qrCodeUrl"))
13978
+ if (!$util.isString(message.qrCodeUrl))
13979
+ return "qrCodeUrl: string expected";
13963
13980
  return null;
13964
13981
  };
13965
13982
 
@@ -13999,6 +14016,8 @@ $root.OrderUpgrade = (function() {
13999
14016
  }
14000
14017
  if (object.state != null)
14001
14018
  message.state = String(object.state);
14019
+ if (object.qrCodeUrl != null)
14020
+ message.qrCodeUrl = String(object.qrCodeUrl);
14002
14021
  return message;
14003
14022
  };
14004
14023
 
@@ -14025,6 +14044,7 @@ $root.OrderUpgrade = (function() {
14025
14044
  object.refund = null;
14026
14045
  object.scan = null;
14027
14046
  object.state = "";
14047
+ object.qrCodeUrl = "";
14028
14048
  }
14029
14049
  if (message._id != null && message.hasOwnProperty("_id"))
14030
14050
  object._id = message._id;
@@ -14044,6 +14064,8 @@ $root.OrderUpgrade = (function() {
14044
14064
  object.scan = $root.Scan.toObject(message.scan, options);
14045
14065
  if (message.state != null && message.hasOwnProperty("state"))
14046
14066
  object.state = message.state;
14067
+ if (message.qrCodeUrl != null && message.hasOwnProperty("qrCodeUrl"))
14068
+ object.qrCodeUrl = message.qrCodeUrl;
14047
14069
  return object;
14048
14070
  };
14049
14071
 
@@ -15223,7 +15245,6 @@ $root.CreateOrderParams = (function() {
15223
15245
  * @property {string|null} [type] CreateOrderParams type
15224
15246
  * @property {string|null} [promotionCode] CreateOrderParams promotionCode
15225
15247
  * @property {Array.<IOrderCustomField>|null} [customFields] CreateOrderParams customFields
15226
- * @property {string|null} [deliveryMethod] CreateOrderParams deliveryMethod
15227
15248
  * @property {string|null} [paymentMethodType] CreateOrderParams paymentMethodType
15228
15249
  * @property {string|null} [holdToken] CreateOrderParams holdToken
15229
15250
  * @property {string|null} [ipAddress] CreateOrderParams ipAddress
@@ -15311,14 +15332,6 @@ $root.CreateOrderParams = (function() {
15311
15332
  */
15312
15333
  CreateOrderParams.prototype.customFields = $util.emptyArray;
15313
15334
 
15314
- /**
15315
- * CreateOrderParams deliveryMethod.
15316
- * @member {string} deliveryMethod
15317
- * @memberof CreateOrderParams
15318
- * @instance
15319
- */
15320
- CreateOrderParams.prototype.deliveryMethod = "";
15321
-
15322
15335
  /**
15323
15336
  * CreateOrderParams paymentMethodType.
15324
15337
  * @member {string} paymentMethodType
@@ -15386,14 +15399,12 @@ $root.CreateOrderParams = (function() {
15386
15399
  if (message.customFields != null && message.customFields.length)
15387
15400
  for (var i = 0; i < message.customFields.length; ++i)
15388
15401
  $root.OrderCustomField.encode(message.customFields[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
15389
- if (message.deliveryMethod != null && Object.hasOwnProperty.call(message, "deliveryMethod"))
15390
- writer.uint32(/* id 8, wireType 2 =*/66).string(message.deliveryMethod);
15391
15402
  if (message.paymentMethodType != null && Object.hasOwnProperty.call(message, "paymentMethodType"))
15392
- writer.uint32(/* id 9, wireType 2 =*/74).string(message.paymentMethodType);
15403
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.paymentMethodType);
15393
15404
  if (message.holdToken != null && Object.hasOwnProperty.call(message, "holdToken"))
15394
- writer.uint32(/* id 10, wireType 2 =*/82).string(message.holdToken);
15405
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.holdToken);
15395
15406
  if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress"))
15396
- writer.uint32(/* id 11, wireType 2 =*/90).string(message.ipAddress);
15407
+ writer.uint32(/* id 10, wireType 2 =*/82).string(message.ipAddress);
15397
15408
  return writer;
15398
15409
  };
15399
15410
 
@@ -15459,15 +15470,12 @@ $root.CreateOrderParams = (function() {
15459
15470
  message.customFields.push($root.OrderCustomField.decode(reader, reader.uint32()));
15460
15471
  break;
15461
15472
  case 8:
15462
- message.deliveryMethod = reader.string();
15463
- break;
15464
- case 9:
15465
15473
  message.paymentMethodType = reader.string();
15466
15474
  break;
15467
- case 10:
15475
+ case 9:
15468
15476
  message.holdToken = reader.string();
15469
15477
  break;
15470
- case 11:
15478
+ case 10:
15471
15479
  message.ipAddress = reader.string();
15472
15480
  break;
15473
15481
  default:
@@ -15547,9 +15555,6 @@ $root.CreateOrderParams = (function() {
15547
15555
  return "customFields." + error;
15548
15556
  }
15549
15557
  }
15550
- if (message.deliveryMethod != null && message.hasOwnProperty("deliveryMethod"))
15551
- if (!$util.isString(message.deliveryMethod))
15552
- return "deliveryMethod: string expected";
15553
15558
  if (message.paymentMethodType != null && message.hasOwnProperty("paymentMethodType"))
15554
15559
  if (!$util.isString(message.paymentMethodType))
15555
15560
  return "paymentMethodType: string expected";
@@ -15614,8 +15619,6 @@ $root.CreateOrderParams = (function() {
15614
15619
  message.customFields[i] = $root.OrderCustomField.fromObject(object.customFields[i]);
15615
15620
  }
15616
15621
  }
15617
- if (object.deliveryMethod != null)
15618
- message.deliveryMethod = String(object.deliveryMethod);
15619
15622
  if (object.paymentMethodType != null)
15620
15623
  message.paymentMethodType = String(object.paymentMethodType);
15621
15624
  if (object.holdToken != null)
@@ -15649,7 +15652,6 @@ $root.CreateOrderParams = (function() {
15649
15652
  object.eventId = "";
15650
15653
  object.type = "";
15651
15654
  object.promotionCode = "";
15652
- object.deliveryMethod = "";
15653
15655
  object.paymentMethodType = "";
15654
15656
  object.holdToken = "";
15655
15657
  object.ipAddress = "";
@@ -15679,8 +15681,6 @@ $root.CreateOrderParams = (function() {
15679
15681
  for (var j = 0; j < message.customFields.length; ++j)
15680
15682
  object.customFields[j] = $root.OrderCustomField.toObject(message.customFields[j], options);
15681
15683
  }
15682
- if (message.deliveryMethod != null && message.hasOwnProperty("deliveryMethod"))
15683
- object.deliveryMethod = message.deliveryMethod;
15684
15684
  if (message.paymentMethodType != null && message.hasOwnProperty("paymentMethodType"))
15685
15685
  object.paymentMethodType = message.paymentMethodType;
15686
15686
  if (message.holdToken != null && message.hasOwnProperty("holdToken"))
@@ -59052,7 +59052,7 @@ $root.StripeCustomer = (function() {
59052
59052
  * @interface IStripeCustomer
59053
59053
  * @property {string|null} [stripeCustomerId] StripeCustomer stripeCustomerId
59054
59054
  * @property {string|null} [email] StripeCustomer email
59055
- * @property {Array.<IStripeSource>|null} [sources] StripeCustomer sources
59055
+ * @property {Array.<IStripePaymentMethod>|null} [paymentMethods] StripeCustomer paymentMethods
59056
59056
  */
59057
59057
 
59058
59058
  /**
@@ -59064,7 +59064,7 @@ $root.StripeCustomer = (function() {
59064
59064
  * @param {IStripeCustomer=} [properties] Properties to set
59065
59065
  */
59066
59066
  function StripeCustomer(properties) {
59067
- this.sources = [];
59067
+ this.paymentMethods = [];
59068
59068
  if (properties)
59069
59069
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
59070
59070
  if (properties[keys[i]] != null)
@@ -59088,12 +59088,12 @@ $root.StripeCustomer = (function() {
59088
59088
  StripeCustomer.prototype.email = "";
59089
59089
 
59090
59090
  /**
59091
- * StripeCustomer sources.
59092
- * @member {Array.<IStripeSource>} sources
59091
+ * StripeCustomer paymentMethods.
59092
+ * @member {Array.<IStripePaymentMethod>} paymentMethods
59093
59093
  * @memberof StripeCustomer
59094
59094
  * @instance
59095
59095
  */
59096
- StripeCustomer.prototype.sources = $util.emptyArray;
59096
+ StripeCustomer.prototype.paymentMethods = $util.emptyArray;
59097
59097
 
59098
59098
  /**
59099
59099
  * Creates a new StripeCustomer instance using the specified properties.
@@ -59123,9 +59123,9 @@ $root.StripeCustomer = (function() {
59123
59123
  writer.uint32(/* id 0, wireType 2 =*/2).string(message.stripeCustomerId);
59124
59124
  if (message.email != null && Object.hasOwnProperty.call(message, "email"))
59125
59125
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.email);
59126
- if (message.sources != null && message.sources.length)
59127
- for (var i = 0; i < message.sources.length; ++i)
59128
- $root.StripeSource.encode(message.sources[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
59126
+ if (message.paymentMethods != null && message.paymentMethods.length)
59127
+ for (var i = 0; i < message.paymentMethods.length; ++i)
59128
+ $root.StripePaymentMethod.encode(message.paymentMethods[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
59129
59129
  return writer;
59130
59130
  };
59131
59131
 
@@ -59167,9 +59167,9 @@ $root.StripeCustomer = (function() {
59167
59167
  message.email = reader.string();
59168
59168
  break;
59169
59169
  case 2:
59170
- if (!(message.sources && message.sources.length))
59171
- message.sources = [];
59172
- message.sources.push($root.StripeSource.decode(reader, reader.uint32()));
59170
+ if (!(message.paymentMethods && message.paymentMethods.length))
59171
+ message.paymentMethods = [];
59172
+ message.paymentMethods.push($root.StripePaymentMethod.decode(reader, reader.uint32()));
59173
59173
  break;
59174
59174
  default:
59175
59175
  reader.skipType(tag & 7);
@@ -59212,13 +59212,13 @@ $root.StripeCustomer = (function() {
59212
59212
  if (message.email != null && message.hasOwnProperty("email"))
59213
59213
  if (!$util.isString(message.email))
59214
59214
  return "email: string expected";
59215
- if (message.sources != null && message.hasOwnProperty("sources")) {
59216
- if (!Array.isArray(message.sources))
59217
- return "sources: array expected";
59218
- for (var i = 0; i < message.sources.length; ++i) {
59219
- var error = $root.StripeSource.verify(message.sources[i]);
59215
+ if (message.paymentMethods != null && message.hasOwnProperty("paymentMethods")) {
59216
+ if (!Array.isArray(message.paymentMethods))
59217
+ return "paymentMethods: array expected";
59218
+ for (var i = 0; i < message.paymentMethods.length; ++i) {
59219
+ var error = $root.StripePaymentMethod.verify(message.paymentMethods[i]);
59220
59220
  if (error)
59221
- return "sources." + error;
59221
+ return "paymentMethods." + error;
59222
59222
  }
59223
59223
  }
59224
59224
  return null;
@@ -59240,14 +59240,14 @@ $root.StripeCustomer = (function() {
59240
59240
  message.stripeCustomerId = String(object.stripeCustomerId);
59241
59241
  if (object.email != null)
59242
59242
  message.email = String(object.email);
59243
- if (object.sources) {
59244
- if (!Array.isArray(object.sources))
59245
- throw TypeError(".StripeCustomer.sources: array expected");
59246
- message.sources = [];
59247
- for (var i = 0; i < object.sources.length; ++i) {
59248
- if (typeof object.sources[i] !== "object")
59249
- throw TypeError(".StripeCustomer.sources: object expected");
59250
- message.sources[i] = $root.StripeSource.fromObject(object.sources[i]);
59243
+ if (object.paymentMethods) {
59244
+ if (!Array.isArray(object.paymentMethods))
59245
+ throw TypeError(".StripeCustomer.paymentMethods: array expected");
59246
+ message.paymentMethods = [];
59247
+ for (var i = 0; i < object.paymentMethods.length; ++i) {
59248
+ if (typeof object.paymentMethods[i] !== "object")
59249
+ throw TypeError(".StripeCustomer.paymentMethods: object expected");
59250
+ message.paymentMethods[i] = $root.StripePaymentMethod.fromObject(object.paymentMethods[i]);
59251
59251
  }
59252
59252
  }
59253
59253
  return message;
@@ -59267,7 +59267,7 @@ $root.StripeCustomer = (function() {
59267
59267
  options = {};
59268
59268
  var object = {};
59269
59269
  if (options.arrays || options.defaults)
59270
- object.sources = [];
59270
+ object.paymentMethods = [];
59271
59271
  if (options.defaults) {
59272
59272
  object.stripeCustomerId = "";
59273
59273
  object.email = "";
@@ -59276,10 +59276,10 @@ $root.StripeCustomer = (function() {
59276
59276
  object.stripeCustomerId = message.stripeCustomerId;
59277
59277
  if (message.email != null && message.hasOwnProperty("email"))
59278
59278
  object.email = message.email;
59279
- if (message.sources && message.sources.length) {
59280
- object.sources = [];
59281
- for (var j = 0; j < message.sources.length; ++j)
59282
- object.sources[j] = $root.StripeSource.toObject(message.sources[j], options);
59279
+ if (message.paymentMethods && message.paymentMethods.length) {
59280
+ object.paymentMethods = [];
59281
+ for (var j = 0; j < message.paymentMethods.length; ++j)
59282
+ object.paymentMethods[j] = $root.StripePaymentMethod.toObject(message.paymentMethods[j], options);
59283
59283
  }
59284
59284
  return object;
59285
59285
  };
@@ -59640,6 +59640,348 @@ $root.StripeSource = (function() {
59640
59640
  return StripeSource;
59641
59641
  })();
59642
59642
 
59643
+ $root.StripePaymentMethod = (function() {
59644
+
59645
+ /**
59646
+ * Properties of a StripePaymentMethod.
59647
+ * @exports IStripePaymentMethod
59648
+ * @interface IStripePaymentMethod
59649
+ * @property {string|null} [paymentMethodId] StripePaymentMethod paymentMethodId
59650
+ * @property {string|null} [brand] StripePaymentMethod brand
59651
+ * @property {string|null} [last4] StripePaymentMethod last4
59652
+ * @property {string|null} [expMonth] StripePaymentMethod expMonth
59653
+ * @property {string|null} [expYear] StripePaymentMethod expYear
59654
+ * @property {string|null} [funding] StripePaymentMethod funding
59655
+ * @property {string|null} [country] StripePaymentMethod country
59656
+ * @property {string|null} [type] StripePaymentMethod type
59657
+ */
59658
+
59659
+ /**
59660
+ * Constructs a new StripePaymentMethod.
59661
+ * @exports StripePaymentMethod
59662
+ * @classdesc Represents a StripePaymentMethod.
59663
+ * @implements IStripePaymentMethod
59664
+ * @constructor
59665
+ * @param {IStripePaymentMethod=} [properties] Properties to set
59666
+ */
59667
+ function StripePaymentMethod(properties) {
59668
+ if (properties)
59669
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
59670
+ if (properties[keys[i]] != null)
59671
+ this[keys[i]] = properties[keys[i]];
59672
+ }
59673
+
59674
+ /**
59675
+ * StripePaymentMethod paymentMethodId.
59676
+ * @member {string} paymentMethodId
59677
+ * @memberof StripePaymentMethod
59678
+ * @instance
59679
+ */
59680
+ StripePaymentMethod.prototype.paymentMethodId = "";
59681
+
59682
+ /**
59683
+ * StripePaymentMethod brand.
59684
+ * @member {string} brand
59685
+ * @memberof StripePaymentMethod
59686
+ * @instance
59687
+ */
59688
+ StripePaymentMethod.prototype.brand = "";
59689
+
59690
+ /**
59691
+ * StripePaymentMethod last4.
59692
+ * @member {string} last4
59693
+ * @memberof StripePaymentMethod
59694
+ * @instance
59695
+ */
59696
+ StripePaymentMethod.prototype.last4 = "";
59697
+
59698
+ /**
59699
+ * StripePaymentMethod expMonth.
59700
+ * @member {string} expMonth
59701
+ * @memberof StripePaymentMethod
59702
+ * @instance
59703
+ */
59704
+ StripePaymentMethod.prototype.expMonth = "";
59705
+
59706
+ /**
59707
+ * StripePaymentMethod expYear.
59708
+ * @member {string} expYear
59709
+ * @memberof StripePaymentMethod
59710
+ * @instance
59711
+ */
59712
+ StripePaymentMethod.prototype.expYear = "";
59713
+
59714
+ /**
59715
+ * StripePaymentMethod funding.
59716
+ * @member {string} funding
59717
+ * @memberof StripePaymentMethod
59718
+ * @instance
59719
+ */
59720
+ StripePaymentMethod.prototype.funding = "";
59721
+
59722
+ /**
59723
+ * StripePaymentMethod country.
59724
+ * @member {string} country
59725
+ * @memberof StripePaymentMethod
59726
+ * @instance
59727
+ */
59728
+ StripePaymentMethod.prototype.country = "";
59729
+
59730
+ /**
59731
+ * StripePaymentMethod type.
59732
+ * @member {string} type
59733
+ * @memberof StripePaymentMethod
59734
+ * @instance
59735
+ */
59736
+ StripePaymentMethod.prototype.type = "";
59737
+
59738
+ /**
59739
+ * Creates a new StripePaymentMethod instance using the specified properties.
59740
+ * @function create
59741
+ * @memberof StripePaymentMethod
59742
+ * @static
59743
+ * @param {IStripePaymentMethod=} [properties] Properties to set
59744
+ * @returns {StripePaymentMethod} StripePaymentMethod instance
59745
+ */
59746
+ StripePaymentMethod.create = function create(properties) {
59747
+ return new StripePaymentMethod(properties);
59748
+ };
59749
+
59750
+ /**
59751
+ * Encodes the specified StripePaymentMethod message. Does not implicitly {@link StripePaymentMethod.verify|verify} messages.
59752
+ * @function encode
59753
+ * @memberof StripePaymentMethod
59754
+ * @static
59755
+ * @param {IStripePaymentMethod} message StripePaymentMethod message or plain object to encode
59756
+ * @param {$protobuf.Writer} [writer] Writer to encode to
59757
+ * @returns {$protobuf.Writer} Writer
59758
+ */
59759
+ StripePaymentMethod.encode = function encode(message, writer) {
59760
+ if (!writer)
59761
+ writer = $Writer.create();
59762
+ if (message.paymentMethodId != null && Object.hasOwnProperty.call(message, "paymentMethodId"))
59763
+ writer.uint32(/* id 0, wireType 2 =*/2).string(message.paymentMethodId);
59764
+ if (message.brand != null && Object.hasOwnProperty.call(message, "brand"))
59765
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.brand);
59766
+ if (message.last4 != null && Object.hasOwnProperty.call(message, "last4"))
59767
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.last4);
59768
+ if (message.expMonth != null && Object.hasOwnProperty.call(message, "expMonth"))
59769
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.expMonth);
59770
+ if (message.expYear != null && Object.hasOwnProperty.call(message, "expYear"))
59771
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.expYear);
59772
+ if (message.funding != null && Object.hasOwnProperty.call(message, "funding"))
59773
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.funding);
59774
+ if (message.country != null && Object.hasOwnProperty.call(message, "country"))
59775
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.country);
59776
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
59777
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.type);
59778
+ return writer;
59779
+ };
59780
+
59781
+ /**
59782
+ * Encodes the specified StripePaymentMethod message, length delimited. Does not implicitly {@link StripePaymentMethod.verify|verify} messages.
59783
+ * @function encodeDelimited
59784
+ * @memberof StripePaymentMethod
59785
+ * @static
59786
+ * @param {IStripePaymentMethod} message StripePaymentMethod message or plain object to encode
59787
+ * @param {$protobuf.Writer} [writer] Writer to encode to
59788
+ * @returns {$protobuf.Writer} Writer
59789
+ */
59790
+ StripePaymentMethod.encodeDelimited = function encodeDelimited(message, writer) {
59791
+ return this.encode(message, writer).ldelim();
59792
+ };
59793
+
59794
+ /**
59795
+ * Decodes a StripePaymentMethod message from the specified reader or buffer.
59796
+ * @function decode
59797
+ * @memberof StripePaymentMethod
59798
+ * @static
59799
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
59800
+ * @param {number} [length] Message length if known beforehand
59801
+ * @returns {StripePaymentMethod} StripePaymentMethod
59802
+ * @throws {Error} If the payload is not a reader or valid buffer
59803
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
59804
+ */
59805
+ StripePaymentMethod.decode = function decode(reader, length) {
59806
+ if (!(reader instanceof $Reader))
59807
+ reader = $Reader.create(reader);
59808
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.StripePaymentMethod();
59809
+ while (reader.pos < end) {
59810
+ var tag = reader.uint32();
59811
+ switch (tag >>> 3) {
59812
+ case 0:
59813
+ message.paymentMethodId = reader.string();
59814
+ break;
59815
+ case 1:
59816
+ message.brand = reader.string();
59817
+ break;
59818
+ case 2:
59819
+ message.last4 = reader.string();
59820
+ break;
59821
+ case 3:
59822
+ message.expMonth = reader.string();
59823
+ break;
59824
+ case 4:
59825
+ message.expYear = reader.string();
59826
+ break;
59827
+ case 5:
59828
+ message.funding = reader.string();
59829
+ break;
59830
+ case 6:
59831
+ message.country = reader.string();
59832
+ break;
59833
+ case 7:
59834
+ message.type = reader.string();
59835
+ break;
59836
+ default:
59837
+ reader.skipType(tag & 7);
59838
+ break;
59839
+ }
59840
+ }
59841
+ return message;
59842
+ };
59843
+
59844
+ /**
59845
+ * Decodes a StripePaymentMethod message from the specified reader or buffer, length delimited.
59846
+ * @function decodeDelimited
59847
+ * @memberof StripePaymentMethod
59848
+ * @static
59849
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
59850
+ * @returns {StripePaymentMethod} StripePaymentMethod
59851
+ * @throws {Error} If the payload is not a reader or valid buffer
59852
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
59853
+ */
59854
+ StripePaymentMethod.decodeDelimited = function decodeDelimited(reader) {
59855
+ if (!(reader instanceof $Reader))
59856
+ reader = new $Reader(reader);
59857
+ return this.decode(reader, reader.uint32());
59858
+ };
59859
+
59860
+ /**
59861
+ * Verifies a StripePaymentMethod message.
59862
+ * @function verify
59863
+ * @memberof StripePaymentMethod
59864
+ * @static
59865
+ * @param {Object.<string,*>} message Plain object to verify
59866
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
59867
+ */
59868
+ StripePaymentMethod.verify = function verify(message) {
59869
+ if (typeof message !== "object" || message === null)
59870
+ return "object expected";
59871
+ if (message.paymentMethodId != null && message.hasOwnProperty("paymentMethodId"))
59872
+ if (!$util.isString(message.paymentMethodId))
59873
+ return "paymentMethodId: string expected";
59874
+ if (message.brand != null && message.hasOwnProperty("brand"))
59875
+ if (!$util.isString(message.brand))
59876
+ return "brand: string expected";
59877
+ if (message.last4 != null && message.hasOwnProperty("last4"))
59878
+ if (!$util.isString(message.last4))
59879
+ return "last4: string expected";
59880
+ if (message.expMonth != null && message.hasOwnProperty("expMonth"))
59881
+ if (!$util.isString(message.expMonth))
59882
+ return "expMonth: string expected";
59883
+ if (message.expYear != null && message.hasOwnProperty("expYear"))
59884
+ if (!$util.isString(message.expYear))
59885
+ return "expYear: string expected";
59886
+ if (message.funding != null && message.hasOwnProperty("funding"))
59887
+ if (!$util.isString(message.funding))
59888
+ return "funding: string expected";
59889
+ if (message.country != null && message.hasOwnProperty("country"))
59890
+ if (!$util.isString(message.country))
59891
+ return "country: string expected";
59892
+ if (message.type != null && message.hasOwnProperty("type"))
59893
+ if (!$util.isString(message.type))
59894
+ return "type: string expected";
59895
+ return null;
59896
+ };
59897
+
59898
+ /**
59899
+ * Creates a StripePaymentMethod message from a plain object. Also converts values to their respective internal types.
59900
+ * @function fromObject
59901
+ * @memberof StripePaymentMethod
59902
+ * @static
59903
+ * @param {Object.<string,*>} object Plain object
59904
+ * @returns {StripePaymentMethod} StripePaymentMethod
59905
+ */
59906
+ StripePaymentMethod.fromObject = function fromObject(object) {
59907
+ if (object instanceof $root.StripePaymentMethod)
59908
+ return object;
59909
+ var message = new $root.StripePaymentMethod();
59910
+ if (object.paymentMethodId != null)
59911
+ message.paymentMethodId = String(object.paymentMethodId);
59912
+ if (object.brand != null)
59913
+ message.brand = String(object.brand);
59914
+ if (object.last4 != null)
59915
+ message.last4 = String(object.last4);
59916
+ if (object.expMonth != null)
59917
+ message.expMonth = String(object.expMonth);
59918
+ if (object.expYear != null)
59919
+ message.expYear = String(object.expYear);
59920
+ if (object.funding != null)
59921
+ message.funding = String(object.funding);
59922
+ if (object.country != null)
59923
+ message.country = String(object.country);
59924
+ if (object.type != null)
59925
+ message.type = String(object.type);
59926
+ return message;
59927
+ };
59928
+
59929
+ /**
59930
+ * Creates a plain object from a StripePaymentMethod message. Also converts values to other types if specified.
59931
+ * @function toObject
59932
+ * @memberof StripePaymentMethod
59933
+ * @static
59934
+ * @param {StripePaymentMethod} message StripePaymentMethod
59935
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
59936
+ * @returns {Object.<string,*>} Plain object
59937
+ */
59938
+ StripePaymentMethod.toObject = function toObject(message, options) {
59939
+ if (!options)
59940
+ options = {};
59941
+ var object = {};
59942
+ if (options.defaults) {
59943
+ object.paymentMethodId = "";
59944
+ object.brand = "";
59945
+ object.last4 = "";
59946
+ object.expMonth = "";
59947
+ object.expYear = "";
59948
+ object.funding = "";
59949
+ object.country = "";
59950
+ object.type = "";
59951
+ }
59952
+ if (message.paymentMethodId != null && message.hasOwnProperty("paymentMethodId"))
59953
+ object.paymentMethodId = message.paymentMethodId;
59954
+ if (message.brand != null && message.hasOwnProperty("brand"))
59955
+ object.brand = message.brand;
59956
+ if (message.last4 != null && message.hasOwnProperty("last4"))
59957
+ object.last4 = message.last4;
59958
+ if (message.expMonth != null && message.hasOwnProperty("expMonth"))
59959
+ object.expMonth = message.expMonth;
59960
+ if (message.expYear != null && message.hasOwnProperty("expYear"))
59961
+ object.expYear = message.expYear;
59962
+ if (message.funding != null && message.hasOwnProperty("funding"))
59963
+ object.funding = message.funding;
59964
+ if (message.country != null && message.hasOwnProperty("country"))
59965
+ object.country = message.country;
59966
+ if (message.type != null && message.hasOwnProperty("type"))
59967
+ object.type = message.type;
59968
+ return object;
59969
+ };
59970
+
59971
+ /**
59972
+ * Converts this StripePaymentMethod to JSON.
59973
+ * @function toJSON
59974
+ * @memberof StripePaymentMethod
59975
+ * @instance
59976
+ * @returns {Object.<string,*>} JSON object
59977
+ */
59978
+ StripePaymentMethod.prototype.toJSON = function toJSON() {
59979
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
59980
+ };
59981
+
59982
+ return StripePaymentMethod;
59983
+ })();
59984
+
59643
59985
  $root.ConnectStripeUserRequest = (function() {
59644
59986
 
59645
59987
  /**
@@ -62412,7 +62754,6 @@ $root.CreateStripeCustomerRequest = (function() {
62412
62754
  * @interface ICreateStripeCustomerRequest
62413
62755
  * @property {string|null} [spanContext] CreateStripeCustomerRequest spanContext
62414
62756
  * @property {string|null} [userId] CreateStripeCustomerRequest userId
62415
- * @property {string|null} [stripeToken] CreateStripeCustomerRequest stripeToken
62416
62757
  */
62417
62758
 
62418
62759
  /**
@@ -62446,14 +62787,6 @@ $root.CreateStripeCustomerRequest = (function() {
62446
62787
  */
62447
62788
  CreateStripeCustomerRequest.prototype.userId = "";
62448
62789
 
62449
- /**
62450
- * CreateStripeCustomerRequest stripeToken.
62451
- * @member {string} stripeToken
62452
- * @memberof CreateStripeCustomerRequest
62453
- * @instance
62454
- */
62455
- CreateStripeCustomerRequest.prototype.stripeToken = "";
62456
-
62457
62790
  /**
62458
62791
  * Creates a new CreateStripeCustomerRequest instance using the specified properties.
62459
62792
  * @function create
@@ -62482,8 +62815,6 @@ $root.CreateStripeCustomerRequest = (function() {
62482
62815
  writer.uint32(/* id 0, wireType 2 =*/2).string(message.spanContext);
62483
62816
  if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
62484
62817
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
62485
- if (message.stripeToken != null && Object.hasOwnProperty.call(message, "stripeToken"))
62486
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.stripeToken);
62487
62818
  return writer;
62488
62819
  };
62489
62820
 
@@ -62524,9 +62855,6 @@ $root.CreateStripeCustomerRequest = (function() {
62524
62855
  case 1:
62525
62856
  message.userId = reader.string();
62526
62857
  break;
62527
- case 2:
62528
- message.stripeToken = reader.string();
62529
- break;
62530
62858
  default:
62531
62859
  reader.skipType(tag & 7);
62532
62860
  break;
@@ -62568,9 +62896,6 @@ $root.CreateStripeCustomerRequest = (function() {
62568
62896
  if (message.userId != null && message.hasOwnProperty("userId"))
62569
62897
  if (!$util.isString(message.userId))
62570
62898
  return "userId: string expected";
62571
- if (message.stripeToken != null && message.hasOwnProperty("stripeToken"))
62572
- if (!$util.isString(message.stripeToken))
62573
- return "stripeToken: string expected";
62574
62899
  return null;
62575
62900
  };
62576
62901
 
@@ -62590,8 +62915,6 @@ $root.CreateStripeCustomerRequest = (function() {
62590
62915
  message.spanContext = String(object.spanContext);
62591
62916
  if (object.userId != null)
62592
62917
  message.userId = String(object.userId);
62593
- if (object.stripeToken != null)
62594
- message.stripeToken = String(object.stripeToken);
62595
62918
  return message;
62596
62919
  };
62597
62920
 
@@ -62611,14 +62934,11 @@ $root.CreateStripeCustomerRequest = (function() {
62611
62934
  if (options.defaults) {
62612
62935
  object.spanContext = "";
62613
62936
  object.userId = "";
62614
- object.stripeToken = "";
62615
62937
  }
62616
62938
  if (message.spanContext != null && message.hasOwnProperty("spanContext"))
62617
62939
  object.spanContext = message.spanContext;
62618
62940
  if (message.userId != null && message.hasOwnProperty("userId"))
62619
62941
  object.userId = message.userId;
62620
- if (message.stripeToken != null && message.hasOwnProperty("stripeToken"))
62621
- object.stripeToken = message.stripeToken;
62622
62942
  return object;
62623
62943
  };
62624
62944
 
@@ -65237,7 +65557,7 @@ $root.AttachStripePaymentMethodResponse = (function() {
65237
65557
  * @interface IAttachStripePaymentMethodResponse
65238
65558
  * @property {StatusCode|null} [status] AttachStripePaymentMethodResponse status
65239
65559
  * @property {Array.<IError>|null} [errors] AttachStripePaymentMethodResponse errors
65240
- * @property {boolean|null} [success] AttachStripePaymentMethodResponse success
65560
+ * @property {IStripePaymentMethod|null} [paymentMethod] AttachStripePaymentMethodResponse paymentMethod
65241
65561
  */
65242
65562
 
65243
65563
  /**
@@ -65273,12 +65593,12 @@ $root.AttachStripePaymentMethodResponse = (function() {
65273
65593
  AttachStripePaymentMethodResponse.prototype.errors = $util.emptyArray;
65274
65594
 
65275
65595
  /**
65276
- * AttachStripePaymentMethodResponse success.
65277
- * @member {boolean} success
65596
+ * AttachStripePaymentMethodResponse paymentMethod.
65597
+ * @member {IStripePaymentMethod|null|undefined} paymentMethod
65278
65598
  * @memberof AttachStripePaymentMethodResponse
65279
65599
  * @instance
65280
65600
  */
65281
- AttachStripePaymentMethodResponse.prototype.success = false;
65601
+ AttachStripePaymentMethodResponse.prototype.paymentMethod = null;
65282
65602
 
65283
65603
  /**
65284
65604
  * Creates a new AttachStripePaymentMethodResponse instance using the specified properties.
@@ -65309,8 +65629,8 @@ $root.AttachStripePaymentMethodResponse = (function() {
65309
65629
  if (message.errors != null && message.errors.length)
65310
65630
  for (var i = 0; i < message.errors.length; ++i)
65311
65631
  $root.Error.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
65312
- if (message.success != null && Object.hasOwnProperty.call(message, "success"))
65313
- writer.uint32(/* id 2, wireType 0 =*/16).bool(message.success);
65632
+ if (message.paymentMethod != null && Object.hasOwnProperty.call(message, "paymentMethod"))
65633
+ $root.StripePaymentMethod.encode(message.paymentMethod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
65314
65634
  return writer;
65315
65635
  };
65316
65636
 
@@ -65354,7 +65674,7 @@ $root.AttachStripePaymentMethodResponse = (function() {
65354
65674
  message.errors.push($root.Error.decode(reader, reader.uint32()));
65355
65675
  break;
65356
65676
  case 2:
65357
- message.success = reader.bool();
65677
+ message.paymentMethod = $root.StripePaymentMethod.decode(reader, reader.uint32());
65358
65678
  break;
65359
65679
  default:
65360
65680
  reader.skipType(tag & 7);
@@ -65414,9 +65734,11 @@ $root.AttachStripePaymentMethodResponse = (function() {
65414
65734
  return "errors." + error;
65415
65735
  }
65416
65736
  }
65417
- if (message.success != null && message.hasOwnProperty("success"))
65418
- if (typeof message.success !== "boolean")
65419
- return "success: boolean expected";
65737
+ if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod")) {
65738
+ var error = $root.StripePaymentMethod.verify(message.paymentMethod);
65739
+ if (error)
65740
+ return "paymentMethod." + error;
65741
+ }
65420
65742
  return null;
65421
65743
  };
65422
65744
 
@@ -65476,8 +65798,11 @@ $root.AttachStripePaymentMethodResponse = (function() {
65476
65798
  message.errors[i] = $root.Error.fromObject(object.errors[i]);
65477
65799
  }
65478
65800
  }
65479
- if (object.success != null)
65480
- message.success = Boolean(object.success);
65801
+ if (object.paymentMethod != null) {
65802
+ if (typeof object.paymentMethod !== "object")
65803
+ throw TypeError(".AttachStripePaymentMethodResponse.paymentMethod: object expected");
65804
+ message.paymentMethod = $root.StripePaymentMethod.fromObject(object.paymentMethod);
65805
+ }
65481
65806
  return message;
65482
65807
  };
65483
65808
 
@@ -65498,7 +65823,7 @@ $root.AttachStripePaymentMethodResponse = (function() {
65498
65823
  object.errors = [];
65499
65824
  if (options.defaults) {
65500
65825
  object.status = options.enums === String ? "UNKNOWN_CODE" : 0;
65501
- object.success = false;
65826
+ object.paymentMethod = null;
65502
65827
  }
65503
65828
  if (message.status != null && message.hasOwnProperty("status"))
65504
65829
  object.status = options.enums === String ? $root.StatusCode[message.status] : message.status;
@@ -65507,8 +65832,8 @@ $root.AttachStripePaymentMethodResponse = (function() {
65507
65832
  for (var j = 0; j < message.errors.length; ++j)
65508
65833
  object.errors[j] = $root.Error.toObject(message.errors[j], options);
65509
65834
  }
65510
- if (message.success != null && message.hasOwnProperty("success"))
65511
- object.success = message.success;
65835
+ if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod"))
65836
+ object.paymentMethod = $root.StripePaymentMethod.toObject(message.paymentMethod, options);
65512
65837
  return object;
65513
65838
  };
65514
65839
 
@@ -65540,6 +65865,7 @@ $root.CreateStripePaymentIntentRequest = (function() {
65540
65865
  * @property {number|null} [feeAmount] CreateStripePaymentIntentRequest feeAmount
65541
65866
  * @property {string|null} [description] CreateStripePaymentIntentRequest description
65542
65867
  * @property {string|null} [currency] CreateStripePaymentIntentRequest currency
65868
+ * @property {string|null} [paymentMethodId] CreateStripePaymentIntentRequest paymentMethodId
65543
65869
  */
65544
65870
 
65545
65871
  /**
@@ -65621,6 +65947,14 @@ $root.CreateStripePaymentIntentRequest = (function() {
65621
65947
  */
65622
65948
  CreateStripePaymentIntentRequest.prototype.currency = "";
65623
65949
 
65950
+ /**
65951
+ * CreateStripePaymentIntentRequest paymentMethodId.
65952
+ * @member {string} paymentMethodId
65953
+ * @memberof CreateStripePaymentIntentRequest
65954
+ * @instance
65955
+ */
65956
+ CreateStripePaymentIntentRequest.prototype.paymentMethodId = "";
65957
+
65624
65958
  /**
65625
65959
  * Creates a new CreateStripePaymentIntentRequest instance using the specified properties.
65626
65960
  * @function create
@@ -65661,6 +65995,8 @@ $root.CreateStripePaymentIntentRequest = (function() {
65661
65995
  writer.uint32(/* id 6, wireType 2 =*/50).string(message.description);
65662
65996
  if (message.currency != null && Object.hasOwnProperty.call(message, "currency"))
65663
65997
  writer.uint32(/* id 7, wireType 2 =*/58).string(message.currency);
65998
+ if (message.paymentMethodId != null && Object.hasOwnProperty.call(message, "paymentMethodId"))
65999
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.paymentMethodId);
65664
66000
  return writer;
65665
66001
  };
65666
66002
 
@@ -65719,6 +66055,9 @@ $root.CreateStripePaymentIntentRequest = (function() {
65719
66055
  case 7:
65720
66056
  message.currency = reader.string();
65721
66057
  break;
66058
+ case 8:
66059
+ message.paymentMethodId = reader.string();
66060
+ break;
65722
66061
  default:
65723
66062
  reader.skipType(tag & 7);
65724
66063
  break;
@@ -65778,6 +66117,9 @@ $root.CreateStripePaymentIntentRequest = (function() {
65778
66117
  if (message.currency != null && message.hasOwnProperty("currency"))
65779
66118
  if (!$util.isString(message.currency))
65780
66119
  return "currency: string expected";
66120
+ if (message.paymentMethodId != null && message.hasOwnProperty("paymentMethodId"))
66121
+ if (!$util.isString(message.paymentMethodId))
66122
+ return "paymentMethodId: string expected";
65781
66123
  return null;
65782
66124
  };
65783
66125
 
@@ -65809,6 +66151,8 @@ $root.CreateStripePaymentIntentRequest = (function() {
65809
66151
  message.description = String(object.description);
65810
66152
  if (object.currency != null)
65811
66153
  message.currency = String(object.currency);
66154
+ if (object.paymentMethodId != null)
66155
+ message.paymentMethodId = String(object.paymentMethodId);
65812
66156
  return message;
65813
66157
  };
65814
66158
 
@@ -65834,6 +66178,7 @@ $root.CreateStripePaymentIntentRequest = (function() {
65834
66178
  object.feeAmount = 0;
65835
66179
  object.description = "";
65836
66180
  object.currency = "";
66181
+ object.paymentMethodId = "";
65837
66182
  }
65838
66183
  if (message.spanContext != null && message.hasOwnProperty("spanContext"))
65839
66184
  object.spanContext = message.spanContext;
@@ -65851,6 +66196,8 @@ $root.CreateStripePaymentIntentRequest = (function() {
65851
66196
  object.description = message.description;
65852
66197
  if (message.currency != null && message.hasOwnProperty("currency"))
65853
66198
  object.currency = message.currency;
66199
+ if (message.paymentMethodId != null && message.hasOwnProperty("paymentMethodId"))
66200
+ object.paymentMethodId = message.paymentMethodId;
65854
66201
  return object;
65855
66202
  };
65856
66203