@sellout/models 0.0.223 → 0.0.224
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.
- package/.dist/sellout-proto.js +655 -0
- package/package.json +3 -3
- package/src/proto/stripe.proto +17 -1
package/.dist/sellout-proto.js
CHANGED
|
@@ -105564,6 +105564,628 @@ $root.CreateStripeSetupIntentResponse = (function() {
|
|
|
105564
105564
|
return CreateStripeSetupIntentResponse;
|
|
105565
105565
|
})();
|
|
105566
105566
|
|
|
105567
|
+
$root.PaymentMethodIdGeneratorRequest = (function() {
|
|
105568
|
+
|
|
105569
|
+
/**
|
|
105570
|
+
* Properties of a PaymentMethodIdGeneratorRequest.
|
|
105571
|
+
* @exports IPaymentMethodIdGeneratorRequest
|
|
105572
|
+
* @interface IPaymentMethodIdGeneratorRequest
|
|
105573
|
+
* @property {string|null} [spanContext] PaymentMethodIdGeneratorRequest spanContext
|
|
105574
|
+
* @property {string|null} [userId] PaymentMethodIdGeneratorRequest userId
|
|
105575
|
+
* @property {string|null} [number] PaymentMethodIdGeneratorRequest number
|
|
105576
|
+
* @property {string|null} [expMonth] PaymentMethodIdGeneratorRequest expMonth
|
|
105577
|
+
* @property {string|null} [expYear] PaymentMethodIdGeneratorRequest expYear
|
|
105578
|
+
* @property {string|null} [cvc] PaymentMethodIdGeneratorRequest cvc
|
|
105579
|
+
* @property {string|null} [name] PaymentMethodIdGeneratorRequest name
|
|
105580
|
+
*/
|
|
105581
|
+
|
|
105582
|
+
/**
|
|
105583
|
+
* Constructs a new PaymentMethodIdGeneratorRequest.
|
|
105584
|
+
* @exports PaymentMethodIdGeneratorRequest
|
|
105585
|
+
* @classdesc Represents a PaymentMethodIdGeneratorRequest.
|
|
105586
|
+
* @implements IPaymentMethodIdGeneratorRequest
|
|
105587
|
+
* @constructor
|
|
105588
|
+
* @param {IPaymentMethodIdGeneratorRequest=} [properties] Properties to set
|
|
105589
|
+
*/
|
|
105590
|
+
function PaymentMethodIdGeneratorRequest(properties) {
|
|
105591
|
+
if (properties)
|
|
105592
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
105593
|
+
if (properties[keys[i]] != null)
|
|
105594
|
+
this[keys[i]] = properties[keys[i]];
|
|
105595
|
+
}
|
|
105596
|
+
|
|
105597
|
+
/**
|
|
105598
|
+
* PaymentMethodIdGeneratorRequest spanContext.
|
|
105599
|
+
* @member {string} spanContext
|
|
105600
|
+
* @memberof PaymentMethodIdGeneratorRequest
|
|
105601
|
+
* @instance
|
|
105602
|
+
*/
|
|
105603
|
+
PaymentMethodIdGeneratorRequest.prototype.spanContext = "";
|
|
105604
|
+
|
|
105605
|
+
/**
|
|
105606
|
+
* PaymentMethodIdGeneratorRequest userId.
|
|
105607
|
+
* @member {string} userId
|
|
105608
|
+
* @memberof PaymentMethodIdGeneratorRequest
|
|
105609
|
+
* @instance
|
|
105610
|
+
*/
|
|
105611
|
+
PaymentMethodIdGeneratorRequest.prototype.userId = "";
|
|
105612
|
+
|
|
105613
|
+
/**
|
|
105614
|
+
* PaymentMethodIdGeneratorRequest number.
|
|
105615
|
+
* @member {string} number
|
|
105616
|
+
* @memberof PaymentMethodIdGeneratorRequest
|
|
105617
|
+
* @instance
|
|
105618
|
+
*/
|
|
105619
|
+
PaymentMethodIdGeneratorRequest.prototype.number = "";
|
|
105620
|
+
|
|
105621
|
+
/**
|
|
105622
|
+
* PaymentMethodIdGeneratorRequest expMonth.
|
|
105623
|
+
* @member {string} expMonth
|
|
105624
|
+
* @memberof PaymentMethodIdGeneratorRequest
|
|
105625
|
+
* @instance
|
|
105626
|
+
*/
|
|
105627
|
+
PaymentMethodIdGeneratorRequest.prototype.expMonth = "";
|
|
105628
|
+
|
|
105629
|
+
/**
|
|
105630
|
+
* PaymentMethodIdGeneratorRequest expYear.
|
|
105631
|
+
* @member {string} expYear
|
|
105632
|
+
* @memberof PaymentMethodIdGeneratorRequest
|
|
105633
|
+
* @instance
|
|
105634
|
+
*/
|
|
105635
|
+
PaymentMethodIdGeneratorRequest.prototype.expYear = "";
|
|
105636
|
+
|
|
105637
|
+
/**
|
|
105638
|
+
* PaymentMethodIdGeneratorRequest cvc.
|
|
105639
|
+
* @member {string} cvc
|
|
105640
|
+
* @memberof PaymentMethodIdGeneratorRequest
|
|
105641
|
+
* @instance
|
|
105642
|
+
*/
|
|
105643
|
+
PaymentMethodIdGeneratorRequest.prototype.cvc = "";
|
|
105644
|
+
|
|
105645
|
+
/**
|
|
105646
|
+
* PaymentMethodIdGeneratorRequest name.
|
|
105647
|
+
* @member {string} name
|
|
105648
|
+
* @memberof PaymentMethodIdGeneratorRequest
|
|
105649
|
+
* @instance
|
|
105650
|
+
*/
|
|
105651
|
+
PaymentMethodIdGeneratorRequest.prototype.name = "";
|
|
105652
|
+
|
|
105653
|
+
/**
|
|
105654
|
+
* Creates a new PaymentMethodIdGeneratorRequest instance using the specified properties.
|
|
105655
|
+
* @function create
|
|
105656
|
+
* @memberof PaymentMethodIdGeneratorRequest
|
|
105657
|
+
* @static
|
|
105658
|
+
* @param {IPaymentMethodIdGeneratorRequest=} [properties] Properties to set
|
|
105659
|
+
* @returns {PaymentMethodIdGeneratorRequest} PaymentMethodIdGeneratorRequest instance
|
|
105660
|
+
*/
|
|
105661
|
+
PaymentMethodIdGeneratorRequest.create = function create(properties) {
|
|
105662
|
+
return new PaymentMethodIdGeneratorRequest(properties);
|
|
105663
|
+
};
|
|
105664
|
+
|
|
105665
|
+
/**
|
|
105666
|
+
* Encodes the specified PaymentMethodIdGeneratorRequest message. Does not implicitly {@link PaymentMethodIdGeneratorRequest.verify|verify} messages.
|
|
105667
|
+
* @function encode
|
|
105668
|
+
* @memberof PaymentMethodIdGeneratorRequest
|
|
105669
|
+
* @static
|
|
105670
|
+
* @param {IPaymentMethodIdGeneratorRequest} message PaymentMethodIdGeneratorRequest message or plain object to encode
|
|
105671
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
105672
|
+
* @returns {$protobuf.Writer} Writer
|
|
105673
|
+
*/
|
|
105674
|
+
PaymentMethodIdGeneratorRequest.encode = function encode(message, writer) {
|
|
105675
|
+
if (!writer)
|
|
105676
|
+
writer = $Writer.create();
|
|
105677
|
+
if (message.spanContext != null && Object.hasOwnProperty.call(message, "spanContext"))
|
|
105678
|
+
writer.uint32(/* id 0, wireType 2 =*/2).string(message.spanContext);
|
|
105679
|
+
if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
|
|
105680
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
|
|
105681
|
+
if (message.number != null && Object.hasOwnProperty.call(message, "number"))
|
|
105682
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.number);
|
|
105683
|
+
if (message.expMonth != null && Object.hasOwnProperty.call(message, "expMonth"))
|
|
105684
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.expMonth);
|
|
105685
|
+
if (message.expYear != null && Object.hasOwnProperty.call(message, "expYear"))
|
|
105686
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.expYear);
|
|
105687
|
+
if (message.cvc != null && Object.hasOwnProperty.call(message, "cvc"))
|
|
105688
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.cvc);
|
|
105689
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
105690
|
+
writer.uint32(/* id 6, wireType 2 =*/50).string(message.name);
|
|
105691
|
+
return writer;
|
|
105692
|
+
};
|
|
105693
|
+
|
|
105694
|
+
/**
|
|
105695
|
+
* Encodes the specified PaymentMethodIdGeneratorRequest message, length delimited. Does not implicitly {@link PaymentMethodIdGeneratorRequest.verify|verify} messages.
|
|
105696
|
+
* @function encodeDelimited
|
|
105697
|
+
* @memberof PaymentMethodIdGeneratorRequest
|
|
105698
|
+
* @static
|
|
105699
|
+
* @param {IPaymentMethodIdGeneratorRequest} message PaymentMethodIdGeneratorRequest message or plain object to encode
|
|
105700
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
105701
|
+
* @returns {$protobuf.Writer} Writer
|
|
105702
|
+
*/
|
|
105703
|
+
PaymentMethodIdGeneratorRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
105704
|
+
return this.encode(message, writer).ldelim();
|
|
105705
|
+
};
|
|
105706
|
+
|
|
105707
|
+
/**
|
|
105708
|
+
* Decodes a PaymentMethodIdGeneratorRequest message from the specified reader or buffer.
|
|
105709
|
+
* @function decode
|
|
105710
|
+
* @memberof PaymentMethodIdGeneratorRequest
|
|
105711
|
+
* @static
|
|
105712
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
105713
|
+
* @param {number} [length] Message length if known beforehand
|
|
105714
|
+
* @returns {PaymentMethodIdGeneratorRequest} PaymentMethodIdGeneratorRequest
|
|
105715
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
105716
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
105717
|
+
*/
|
|
105718
|
+
PaymentMethodIdGeneratorRequest.decode = function decode(reader, length) {
|
|
105719
|
+
if (!(reader instanceof $Reader))
|
|
105720
|
+
reader = $Reader.create(reader);
|
|
105721
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.PaymentMethodIdGeneratorRequest();
|
|
105722
|
+
while (reader.pos < end) {
|
|
105723
|
+
var tag = reader.uint32();
|
|
105724
|
+
switch (tag >>> 3) {
|
|
105725
|
+
case 0:
|
|
105726
|
+
message.spanContext = reader.string();
|
|
105727
|
+
break;
|
|
105728
|
+
case 1:
|
|
105729
|
+
message.userId = reader.string();
|
|
105730
|
+
break;
|
|
105731
|
+
case 2:
|
|
105732
|
+
message.number = reader.string();
|
|
105733
|
+
break;
|
|
105734
|
+
case 3:
|
|
105735
|
+
message.expMonth = reader.string();
|
|
105736
|
+
break;
|
|
105737
|
+
case 4:
|
|
105738
|
+
message.expYear = reader.string();
|
|
105739
|
+
break;
|
|
105740
|
+
case 5:
|
|
105741
|
+
message.cvc = reader.string();
|
|
105742
|
+
break;
|
|
105743
|
+
case 6:
|
|
105744
|
+
message.name = reader.string();
|
|
105745
|
+
break;
|
|
105746
|
+
default:
|
|
105747
|
+
reader.skipType(tag & 7);
|
|
105748
|
+
break;
|
|
105749
|
+
}
|
|
105750
|
+
}
|
|
105751
|
+
return message;
|
|
105752
|
+
};
|
|
105753
|
+
|
|
105754
|
+
/**
|
|
105755
|
+
* Decodes a PaymentMethodIdGeneratorRequest message from the specified reader or buffer, length delimited.
|
|
105756
|
+
* @function decodeDelimited
|
|
105757
|
+
* @memberof PaymentMethodIdGeneratorRequest
|
|
105758
|
+
* @static
|
|
105759
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
105760
|
+
* @returns {PaymentMethodIdGeneratorRequest} PaymentMethodIdGeneratorRequest
|
|
105761
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
105762
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
105763
|
+
*/
|
|
105764
|
+
PaymentMethodIdGeneratorRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
105765
|
+
if (!(reader instanceof $Reader))
|
|
105766
|
+
reader = new $Reader(reader);
|
|
105767
|
+
return this.decode(reader, reader.uint32());
|
|
105768
|
+
};
|
|
105769
|
+
|
|
105770
|
+
/**
|
|
105771
|
+
* Verifies a PaymentMethodIdGeneratorRequest message.
|
|
105772
|
+
* @function verify
|
|
105773
|
+
* @memberof PaymentMethodIdGeneratorRequest
|
|
105774
|
+
* @static
|
|
105775
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
105776
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
105777
|
+
*/
|
|
105778
|
+
PaymentMethodIdGeneratorRequest.verify = function verify(message) {
|
|
105779
|
+
if (typeof message !== "object" || message === null)
|
|
105780
|
+
return "object expected";
|
|
105781
|
+
if (message.spanContext != null && message.hasOwnProperty("spanContext"))
|
|
105782
|
+
if (!$util.isString(message.spanContext))
|
|
105783
|
+
return "spanContext: string expected";
|
|
105784
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
105785
|
+
if (!$util.isString(message.userId))
|
|
105786
|
+
return "userId: string expected";
|
|
105787
|
+
if (message.number != null && message.hasOwnProperty("number"))
|
|
105788
|
+
if (!$util.isString(message.number))
|
|
105789
|
+
return "number: string expected";
|
|
105790
|
+
if (message.expMonth != null && message.hasOwnProperty("expMonth"))
|
|
105791
|
+
if (!$util.isString(message.expMonth))
|
|
105792
|
+
return "expMonth: string expected";
|
|
105793
|
+
if (message.expYear != null && message.hasOwnProperty("expYear"))
|
|
105794
|
+
if (!$util.isString(message.expYear))
|
|
105795
|
+
return "expYear: string expected";
|
|
105796
|
+
if (message.cvc != null && message.hasOwnProperty("cvc"))
|
|
105797
|
+
if (!$util.isString(message.cvc))
|
|
105798
|
+
return "cvc: string expected";
|
|
105799
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
105800
|
+
if (!$util.isString(message.name))
|
|
105801
|
+
return "name: string expected";
|
|
105802
|
+
return null;
|
|
105803
|
+
};
|
|
105804
|
+
|
|
105805
|
+
/**
|
|
105806
|
+
* Creates a PaymentMethodIdGeneratorRequest message from a plain object. Also converts values to their respective internal types.
|
|
105807
|
+
* @function fromObject
|
|
105808
|
+
* @memberof PaymentMethodIdGeneratorRequest
|
|
105809
|
+
* @static
|
|
105810
|
+
* @param {Object.<string,*>} object Plain object
|
|
105811
|
+
* @returns {PaymentMethodIdGeneratorRequest} PaymentMethodIdGeneratorRequest
|
|
105812
|
+
*/
|
|
105813
|
+
PaymentMethodIdGeneratorRequest.fromObject = function fromObject(object) {
|
|
105814
|
+
if (object instanceof $root.PaymentMethodIdGeneratorRequest)
|
|
105815
|
+
return object;
|
|
105816
|
+
var message = new $root.PaymentMethodIdGeneratorRequest();
|
|
105817
|
+
if (object.spanContext != null)
|
|
105818
|
+
message.spanContext = String(object.spanContext);
|
|
105819
|
+
if (object.userId != null)
|
|
105820
|
+
message.userId = String(object.userId);
|
|
105821
|
+
if (object.number != null)
|
|
105822
|
+
message.number = String(object.number);
|
|
105823
|
+
if (object.expMonth != null)
|
|
105824
|
+
message.expMonth = String(object.expMonth);
|
|
105825
|
+
if (object.expYear != null)
|
|
105826
|
+
message.expYear = String(object.expYear);
|
|
105827
|
+
if (object.cvc != null)
|
|
105828
|
+
message.cvc = String(object.cvc);
|
|
105829
|
+
if (object.name != null)
|
|
105830
|
+
message.name = String(object.name);
|
|
105831
|
+
return message;
|
|
105832
|
+
};
|
|
105833
|
+
|
|
105834
|
+
/**
|
|
105835
|
+
* Creates a plain object from a PaymentMethodIdGeneratorRequest message. Also converts values to other types if specified.
|
|
105836
|
+
* @function toObject
|
|
105837
|
+
* @memberof PaymentMethodIdGeneratorRequest
|
|
105838
|
+
* @static
|
|
105839
|
+
* @param {PaymentMethodIdGeneratorRequest} message PaymentMethodIdGeneratorRequest
|
|
105840
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
105841
|
+
* @returns {Object.<string,*>} Plain object
|
|
105842
|
+
*/
|
|
105843
|
+
PaymentMethodIdGeneratorRequest.toObject = function toObject(message, options) {
|
|
105844
|
+
if (!options)
|
|
105845
|
+
options = {};
|
|
105846
|
+
var object = {};
|
|
105847
|
+
if (options.defaults) {
|
|
105848
|
+
object.spanContext = "";
|
|
105849
|
+
object.userId = "";
|
|
105850
|
+
object.number = "";
|
|
105851
|
+
object.expMonth = "";
|
|
105852
|
+
object.expYear = "";
|
|
105853
|
+
object.cvc = "";
|
|
105854
|
+
object.name = "";
|
|
105855
|
+
}
|
|
105856
|
+
if (message.spanContext != null && message.hasOwnProperty("spanContext"))
|
|
105857
|
+
object.spanContext = message.spanContext;
|
|
105858
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
105859
|
+
object.userId = message.userId;
|
|
105860
|
+
if (message.number != null && message.hasOwnProperty("number"))
|
|
105861
|
+
object.number = message.number;
|
|
105862
|
+
if (message.expMonth != null && message.hasOwnProperty("expMonth"))
|
|
105863
|
+
object.expMonth = message.expMonth;
|
|
105864
|
+
if (message.expYear != null && message.hasOwnProperty("expYear"))
|
|
105865
|
+
object.expYear = message.expYear;
|
|
105866
|
+
if (message.cvc != null && message.hasOwnProperty("cvc"))
|
|
105867
|
+
object.cvc = message.cvc;
|
|
105868
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
105869
|
+
object.name = message.name;
|
|
105870
|
+
return object;
|
|
105871
|
+
};
|
|
105872
|
+
|
|
105873
|
+
/**
|
|
105874
|
+
* Converts this PaymentMethodIdGeneratorRequest to JSON.
|
|
105875
|
+
* @function toJSON
|
|
105876
|
+
* @memberof PaymentMethodIdGeneratorRequest
|
|
105877
|
+
* @instance
|
|
105878
|
+
* @returns {Object.<string,*>} JSON object
|
|
105879
|
+
*/
|
|
105880
|
+
PaymentMethodIdGeneratorRequest.prototype.toJSON = function toJSON() {
|
|
105881
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
105882
|
+
};
|
|
105883
|
+
|
|
105884
|
+
return PaymentMethodIdGeneratorRequest;
|
|
105885
|
+
})();
|
|
105886
|
+
|
|
105887
|
+
$root.PaymentMethodIdGeneratorResponse = (function() {
|
|
105888
|
+
|
|
105889
|
+
/**
|
|
105890
|
+
* Properties of a PaymentMethodIdGeneratorResponse.
|
|
105891
|
+
* @exports IPaymentMethodIdGeneratorResponse
|
|
105892
|
+
* @interface IPaymentMethodIdGeneratorResponse
|
|
105893
|
+
* @property {string|null} [paymentMethodId] PaymentMethodIdGeneratorResponse paymentMethodId
|
|
105894
|
+
* @property {StatusCode|null} [status] PaymentMethodIdGeneratorResponse status
|
|
105895
|
+
* @property {Array.<IError>|null} [errors] PaymentMethodIdGeneratorResponse errors
|
|
105896
|
+
*/
|
|
105897
|
+
|
|
105898
|
+
/**
|
|
105899
|
+
* Constructs a new PaymentMethodIdGeneratorResponse.
|
|
105900
|
+
* @exports PaymentMethodIdGeneratorResponse
|
|
105901
|
+
* @classdesc Represents a PaymentMethodIdGeneratorResponse.
|
|
105902
|
+
* @implements IPaymentMethodIdGeneratorResponse
|
|
105903
|
+
* @constructor
|
|
105904
|
+
* @param {IPaymentMethodIdGeneratorResponse=} [properties] Properties to set
|
|
105905
|
+
*/
|
|
105906
|
+
function PaymentMethodIdGeneratorResponse(properties) {
|
|
105907
|
+
this.errors = [];
|
|
105908
|
+
if (properties)
|
|
105909
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
105910
|
+
if (properties[keys[i]] != null)
|
|
105911
|
+
this[keys[i]] = properties[keys[i]];
|
|
105912
|
+
}
|
|
105913
|
+
|
|
105914
|
+
/**
|
|
105915
|
+
* PaymentMethodIdGeneratorResponse paymentMethodId.
|
|
105916
|
+
* @member {string} paymentMethodId
|
|
105917
|
+
* @memberof PaymentMethodIdGeneratorResponse
|
|
105918
|
+
* @instance
|
|
105919
|
+
*/
|
|
105920
|
+
PaymentMethodIdGeneratorResponse.prototype.paymentMethodId = "";
|
|
105921
|
+
|
|
105922
|
+
/**
|
|
105923
|
+
* PaymentMethodIdGeneratorResponse status.
|
|
105924
|
+
* @member {StatusCode} status
|
|
105925
|
+
* @memberof PaymentMethodIdGeneratorResponse
|
|
105926
|
+
* @instance
|
|
105927
|
+
*/
|
|
105928
|
+
PaymentMethodIdGeneratorResponse.prototype.status = 0;
|
|
105929
|
+
|
|
105930
|
+
/**
|
|
105931
|
+
* PaymentMethodIdGeneratorResponse errors.
|
|
105932
|
+
* @member {Array.<IError>} errors
|
|
105933
|
+
* @memberof PaymentMethodIdGeneratorResponse
|
|
105934
|
+
* @instance
|
|
105935
|
+
*/
|
|
105936
|
+
PaymentMethodIdGeneratorResponse.prototype.errors = $util.emptyArray;
|
|
105937
|
+
|
|
105938
|
+
/**
|
|
105939
|
+
* Creates a new PaymentMethodIdGeneratorResponse instance using the specified properties.
|
|
105940
|
+
* @function create
|
|
105941
|
+
* @memberof PaymentMethodIdGeneratorResponse
|
|
105942
|
+
* @static
|
|
105943
|
+
* @param {IPaymentMethodIdGeneratorResponse=} [properties] Properties to set
|
|
105944
|
+
* @returns {PaymentMethodIdGeneratorResponse} PaymentMethodIdGeneratorResponse instance
|
|
105945
|
+
*/
|
|
105946
|
+
PaymentMethodIdGeneratorResponse.create = function create(properties) {
|
|
105947
|
+
return new PaymentMethodIdGeneratorResponse(properties);
|
|
105948
|
+
};
|
|
105949
|
+
|
|
105950
|
+
/**
|
|
105951
|
+
* Encodes the specified PaymentMethodIdGeneratorResponse message. Does not implicitly {@link PaymentMethodIdGeneratorResponse.verify|verify} messages.
|
|
105952
|
+
* @function encode
|
|
105953
|
+
* @memberof PaymentMethodIdGeneratorResponse
|
|
105954
|
+
* @static
|
|
105955
|
+
* @param {IPaymentMethodIdGeneratorResponse} message PaymentMethodIdGeneratorResponse message or plain object to encode
|
|
105956
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
105957
|
+
* @returns {$protobuf.Writer} Writer
|
|
105958
|
+
*/
|
|
105959
|
+
PaymentMethodIdGeneratorResponse.encode = function encode(message, writer) {
|
|
105960
|
+
if (!writer)
|
|
105961
|
+
writer = $Writer.create();
|
|
105962
|
+
if (message.paymentMethodId != null && Object.hasOwnProperty.call(message, "paymentMethodId"))
|
|
105963
|
+
writer.uint32(/* id 0, wireType 2 =*/2).string(message.paymentMethodId);
|
|
105964
|
+
if (message.status != null && Object.hasOwnProperty.call(message, "status"))
|
|
105965
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status);
|
|
105966
|
+
if (message.errors != null && message.errors.length)
|
|
105967
|
+
for (var i = 0; i < message.errors.length; ++i)
|
|
105968
|
+
$root.Error.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
105969
|
+
return writer;
|
|
105970
|
+
};
|
|
105971
|
+
|
|
105972
|
+
/**
|
|
105973
|
+
* Encodes the specified PaymentMethodIdGeneratorResponse message, length delimited. Does not implicitly {@link PaymentMethodIdGeneratorResponse.verify|verify} messages.
|
|
105974
|
+
* @function encodeDelimited
|
|
105975
|
+
* @memberof PaymentMethodIdGeneratorResponse
|
|
105976
|
+
* @static
|
|
105977
|
+
* @param {IPaymentMethodIdGeneratorResponse} message PaymentMethodIdGeneratorResponse message or plain object to encode
|
|
105978
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
105979
|
+
* @returns {$protobuf.Writer} Writer
|
|
105980
|
+
*/
|
|
105981
|
+
PaymentMethodIdGeneratorResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
105982
|
+
return this.encode(message, writer).ldelim();
|
|
105983
|
+
};
|
|
105984
|
+
|
|
105985
|
+
/**
|
|
105986
|
+
* Decodes a PaymentMethodIdGeneratorResponse message from the specified reader or buffer.
|
|
105987
|
+
* @function decode
|
|
105988
|
+
* @memberof PaymentMethodIdGeneratorResponse
|
|
105989
|
+
* @static
|
|
105990
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
105991
|
+
* @param {number} [length] Message length if known beforehand
|
|
105992
|
+
* @returns {PaymentMethodIdGeneratorResponse} PaymentMethodIdGeneratorResponse
|
|
105993
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
105994
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
105995
|
+
*/
|
|
105996
|
+
PaymentMethodIdGeneratorResponse.decode = function decode(reader, length) {
|
|
105997
|
+
if (!(reader instanceof $Reader))
|
|
105998
|
+
reader = $Reader.create(reader);
|
|
105999
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.PaymentMethodIdGeneratorResponse();
|
|
106000
|
+
while (reader.pos < end) {
|
|
106001
|
+
var tag = reader.uint32();
|
|
106002
|
+
switch (tag >>> 3) {
|
|
106003
|
+
case 0:
|
|
106004
|
+
message.paymentMethodId = reader.string();
|
|
106005
|
+
break;
|
|
106006
|
+
case 1:
|
|
106007
|
+
message.status = reader.int32();
|
|
106008
|
+
break;
|
|
106009
|
+
case 2:
|
|
106010
|
+
if (!(message.errors && message.errors.length))
|
|
106011
|
+
message.errors = [];
|
|
106012
|
+
message.errors.push($root.Error.decode(reader, reader.uint32()));
|
|
106013
|
+
break;
|
|
106014
|
+
default:
|
|
106015
|
+
reader.skipType(tag & 7);
|
|
106016
|
+
break;
|
|
106017
|
+
}
|
|
106018
|
+
}
|
|
106019
|
+
return message;
|
|
106020
|
+
};
|
|
106021
|
+
|
|
106022
|
+
/**
|
|
106023
|
+
* Decodes a PaymentMethodIdGeneratorResponse message from the specified reader or buffer, length delimited.
|
|
106024
|
+
* @function decodeDelimited
|
|
106025
|
+
* @memberof PaymentMethodIdGeneratorResponse
|
|
106026
|
+
* @static
|
|
106027
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
106028
|
+
* @returns {PaymentMethodIdGeneratorResponse} PaymentMethodIdGeneratorResponse
|
|
106029
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
106030
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
106031
|
+
*/
|
|
106032
|
+
PaymentMethodIdGeneratorResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
106033
|
+
if (!(reader instanceof $Reader))
|
|
106034
|
+
reader = new $Reader(reader);
|
|
106035
|
+
return this.decode(reader, reader.uint32());
|
|
106036
|
+
};
|
|
106037
|
+
|
|
106038
|
+
/**
|
|
106039
|
+
* Verifies a PaymentMethodIdGeneratorResponse message.
|
|
106040
|
+
* @function verify
|
|
106041
|
+
* @memberof PaymentMethodIdGeneratorResponse
|
|
106042
|
+
* @static
|
|
106043
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
106044
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
106045
|
+
*/
|
|
106046
|
+
PaymentMethodIdGeneratorResponse.verify = function verify(message) {
|
|
106047
|
+
if (typeof message !== "object" || message === null)
|
|
106048
|
+
return "object expected";
|
|
106049
|
+
if (message.paymentMethodId != null && message.hasOwnProperty("paymentMethodId"))
|
|
106050
|
+
if (!$util.isString(message.paymentMethodId))
|
|
106051
|
+
return "paymentMethodId: string expected";
|
|
106052
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
106053
|
+
switch (message.status) {
|
|
106054
|
+
default:
|
|
106055
|
+
return "status: enum value expected";
|
|
106056
|
+
case 0:
|
|
106057
|
+
case 200:
|
|
106058
|
+
case 400:
|
|
106059
|
+
case 401:
|
|
106060
|
+
case 403:
|
|
106061
|
+
case 422:
|
|
106062
|
+
case 404:
|
|
106063
|
+
case 500:
|
|
106064
|
+
case 504:
|
|
106065
|
+
break;
|
|
106066
|
+
}
|
|
106067
|
+
if (message.errors != null && message.hasOwnProperty("errors")) {
|
|
106068
|
+
if (!Array.isArray(message.errors))
|
|
106069
|
+
return "errors: array expected";
|
|
106070
|
+
for (var i = 0; i < message.errors.length; ++i) {
|
|
106071
|
+
var error = $root.Error.verify(message.errors[i]);
|
|
106072
|
+
if (error)
|
|
106073
|
+
return "errors." + error;
|
|
106074
|
+
}
|
|
106075
|
+
}
|
|
106076
|
+
return null;
|
|
106077
|
+
};
|
|
106078
|
+
|
|
106079
|
+
/**
|
|
106080
|
+
* Creates a PaymentMethodIdGeneratorResponse message from a plain object. Also converts values to their respective internal types.
|
|
106081
|
+
* @function fromObject
|
|
106082
|
+
* @memberof PaymentMethodIdGeneratorResponse
|
|
106083
|
+
* @static
|
|
106084
|
+
* @param {Object.<string,*>} object Plain object
|
|
106085
|
+
* @returns {PaymentMethodIdGeneratorResponse} PaymentMethodIdGeneratorResponse
|
|
106086
|
+
*/
|
|
106087
|
+
PaymentMethodIdGeneratorResponse.fromObject = function fromObject(object) {
|
|
106088
|
+
if (object instanceof $root.PaymentMethodIdGeneratorResponse)
|
|
106089
|
+
return object;
|
|
106090
|
+
var message = new $root.PaymentMethodIdGeneratorResponse();
|
|
106091
|
+
if (object.paymentMethodId != null)
|
|
106092
|
+
message.paymentMethodId = String(object.paymentMethodId);
|
|
106093
|
+
switch (object.status) {
|
|
106094
|
+
case "UNKNOWN_CODE":
|
|
106095
|
+
case 0:
|
|
106096
|
+
message.status = 0;
|
|
106097
|
+
break;
|
|
106098
|
+
case "OK":
|
|
106099
|
+
case 200:
|
|
106100
|
+
message.status = 200;
|
|
106101
|
+
break;
|
|
106102
|
+
case "BAD_REQUEST":
|
|
106103
|
+
case 400:
|
|
106104
|
+
message.status = 400;
|
|
106105
|
+
break;
|
|
106106
|
+
case "UNAUTHORIZED":
|
|
106107
|
+
case 401:
|
|
106108
|
+
message.status = 401;
|
|
106109
|
+
break;
|
|
106110
|
+
case "FORBIDDEN":
|
|
106111
|
+
case 403:
|
|
106112
|
+
message.status = 403;
|
|
106113
|
+
break;
|
|
106114
|
+
case "UNPROCESSABLE_ENTITY":
|
|
106115
|
+
case 422:
|
|
106116
|
+
message.status = 422;
|
|
106117
|
+
break;
|
|
106118
|
+
case "NOT_FOUND":
|
|
106119
|
+
case 404:
|
|
106120
|
+
message.status = 404;
|
|
106121
|
+
break;
|
|
106122
|
+
case "INTERNAL_SERVER_ERROR":
|
|
106123
|
+
case 500:
|
|
106124
|
+
message.status = 500;
|
|
106125
|
+
break;
|
|
106126
|
+
case "GATEWAY_TIMEOUT":
|
|
106127
|
+
case 504:
|
|
106128
|
+
message.status = 504;
|
|
106129
|
+
break;
|
|
106130
|
+
}
|
|
106131
|
+
if (object.errors) {
|
|
106132
|
+
if (!Array.isArray(object.errors))
|
|
106133
|
+
throw TypeError(".PaymentMethodIdGeneratorResponse.errors: array expected");
|
|
106134
|
+
message.errors = [];
|
|
106135
|
+
for (var i = 0; i < object.errors.length; ++i) {
|
|
106136
|
+
if (typeof object.errors[i] !== "object")
|
|
106137
|
+
throw TypeError(".PaymentMethodIdGeneratorResponse.errors: object expected");
|
|
106138
|
+
message.errors[i] = $root.Error.fromObject(object.errors[i]);
|
|
106139
|
+
}
|
|
106140
|
+
}
|
|
106141
|
+
return message;
|
|
106142
|
+
};
|
|
106143
|
+
|
|
106144
|
+
/**
|
|
106145
|
+
* Creates a plain object from a PaymentMethodIdGeneratorResponse message. Also converts values to other types if specified.
|
|
106146
|
+
* @function toObject
|
|
106147
|
+
* @memberof PaymentMethodIdGeneratorResponse
|
|
106148
|
+
* @static
|
|
106149
|
+
* @param {PaymentMethodIdGeneratorResponse} message PaymentMethodIdGeneratorResponse
|
|
106150
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
106151
|
+
* @returns {Object.<string,*>} Plain object
|
|
106152
|
+
*/
|
|
106153
|
+
PaymentMethodIdGeneratorResponse.toObject = function toObject(message, options) {
|
|
106154
|
+
if (!options)
|
|
106155
|
+
options = {};
|
|
106156
|
+
var object = {};
|
|
106157
|
+
if (options.arrays || options.defaults)
|
|
106158
|
+
object.errors = [];
|
|
106159
|
+
if (options.defaults) {
|
|
106160
|
+
object.paymentMethodId = "";
|
|
106161
|
+
object.status = options.enums === String ? "UNKNOWN_CODE" : 0;
|
|
106162
|
+
}
|
|
106163
|
+
if (message.paymentMethodId != null && message.hasOwnProperty("paymentMethodId"))
|
|
106164
|
+
object.paymentMethodId = message.paymentMethodId;
|
|
106165
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
106166
|
+
object.status = options.enums === String ? $root.StatusCode[message.status] : message.status;
|
|
106167
|
+
if (message.errors && message.errors.length) {
|
|
106168
|
+
object.errors = [];
|
|
106169
|
+
for (var j = 0; j < message.errors.length; ++j)
|
|
106170
|
+
object.errors[j] = $root.Error.toObject(message.errors[j], options);
|
|
106171
|
+
}
|
|
106172
|
+
return object;
|
|
106173
|
+
};
|
|
106174
|
+
|
|
106175
|
+
/**
|
|
106176
|
+
* Converts this PaymentMethodIdGeneratorResponse to JSON.
|
|
106177
|
+
* @function toJSON
|
|
106178
|
+
* @memberof PaymentMethodIdGeneratorResponse
|
|
106179
|
+
* @instance
|
|
106180
|
+
* @returns {Object.<string,*>} JSON object
|
|
106181
|
+
*/
|
|
106182
|
+
PaymentMethodIdGeneratorResponse.prototype.toJSON = function toJSON() {
|
|
106183
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
106184
|
+
};
|
|
106185
|
+
|
|
106186
|
+
return PaymentMethodIdGeneratorResponse;
|
|
106187
|
+
})();
|
|
106188
|
+
|
|
105567
106189
|
$root.AttachStripePaymentMethodRequest = (function() {
|
|
105568
106190
|
|
|
105569
106191
|
/**
|
|
@@ -111626,6 +112248,39 @@ $root.StripeService = (function() {
|
|
|
111626
112248
|
* @variation 2
|
|
111627
112249
|
*/
|
|
111628
112250
|
|
|
112251
|
+
/**
|
|
112252
|
+
* Callback as used by {@link StripeService#paymentMethodIdGenerator}.
|
|
112253
|
+
* @memberof StripeService
|
|
112254
|
+
* @typedef paymentMethodIdGeneratorCallback
|
|
112255
|
+
* @type {function}
|
|
112256
|
+
* @param {Error|null} error Error, if any
|
|
112257
|
+
* @param {PaymentMethodIdGeneratorResponse} [response] PaymentMethodIdGeneratorResponse
|
|
112258
|
+
*/
|
|
112259
|
+
|
|
112260
|
+
/**
|
|
112261
|
+
* Calls paymentMethodIdGenerator.
|
|
112262
|
+
* @function paymentMethodIdGenerator
|
|
112263
|
+
* @memberof StripeService
|
|
112264
|
+
* @instance
|
|
112265
|
+
* @param {IPaymentMethodIdGeneratorRequest} request PaymentMethodIdGeneratorRequest message or plain object
|
|
112266
|
+
* @param {StripeService.paymentMethodIdGeneratorCallback} callback Node-style callback called with the error, if any, and PaymentMethodIdGeneratorResponse
|
|
112267
|
+
* @returns {undefined}
|
|
112268
|
+
* @variation 1
|
|
112269
|
+
*/
|
|
112270
|
+
Object.defineProperty(StripeService.prototype.paymentMethodIdGenerator = function paymentMethodIdGenerator(request, callback) {
|
|
112271
|
+
return this.rpcCall(paymentMethodIdGenerator, $root.PaymentMethodIdGeneratorRequest, $root.PaymentMethodIdGeneratorResponse, request, callback);
|
|
112272
|
+
}, "name", { value: "paymentMethodIdGenerator" });
|
|
112273
|
+
|
|
112274
|
+
/**
|
|
112275
|
+
* Calls paymentMethodIdGenerator.
|
|
112276
|
+
* @function paymentMethodIdGenerator
|
|
112277
|
+
* @memberof StripeService
|
|
112278
|
+
* @instance
|
|
112279
|
+
* @param {IPaymentMethodIdGeneratorRequest} request PaymentMethodIdGeneratorRequest message or plain object
|
|
112280
|
+
* @returns {Promise<PaymentMethodIdGeneratorResponse>} Promise
|
|
112281
|
+
* @variation 2
|
|
112282
|
+
*/
|
|
112283
|
+
|
|
111629
112284
|
return StripeService;
|
|
111630
112285
|
})();
|
|
111631
112286
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sellout/models",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.224",
|
|
4
4
|
"description": "Sellout.io models",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@hapi/joi": "^16.1.7",
|
|
20
|
-
"@sellout/utils": "^0.0.
|
|
20
|
+
"@sellout/utils": "^0.0.224",
|
|
21
21
|
"@types/hapi__joi": "^16.0.1",
|
|
22
22
|
"@types/shortid": "^0.0.29",
|
|
23
23
|
"apollo-link-debounce": "^2.1.0",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"protobufjs": "^6.11.2",
|
|
32
32
|
"typescript": "^4.4.2"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "60e38e7be6d70b16c24fc154196bd2eadbb2ffe7"
|
|
35
35
|
}
|
package/src/proto/stripe.proto
CHANGED
|
@@ -223,6 +223,22 @@ message CreateStripeSetupIntentResponse {
|
|
|
223
223
|
string clientSecret = 2;
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
+
message PaymentMethodIdGeneratorRequest {
|
|
227
|
+
string spanContext = 0;
|
|
228
|
+
string userId = 1;
|
|
229
|
+
string number = 2;
|
|
230
|
+
string expMonth = 3;
|
|
231
|
+
string expYear = 4;
|
|
232
|
+
string cvc = 5;
|
|
233
|
+
string name = 6;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
message PaymentMethodIdGeneratorResponse {
|
|
237
|
+
string paymentMethodId = 0;
|
|
238
|
+
StatusCode status = 1;
|
|
239
|
+
repeated Error errors = 2;
|
|
240
|
+
}
|
|
241
|
+
|
|
226
242
|
message AttachStripePaymentMethodRequest {
|
|
227
243
|
string spanContext = 0;
|
|
228
244
|
string userId = 1;
|
|
@@ -394,5 +410,5 @@ service StripeService {
|
|
|
394
410
|
rpc listStripeTerminalReaders(ListStripeTerminalReadersRequest) returns (ListStripeTerminalReadersResponse) {}
|
|
395
411
|
rpc deleteStripeTerminalReader(DeleteStripeTerminalReaderRequest) returns (DeleteStripeTerminalReaderResponse) {}
|
|
396
412
|
rpc createStripeTerminalConnectionToken(CreateStripeTerminalConnectionTokenRequest) returns (CreateStripeTerminalConnectionTokenResponse) {}
|
|
397
|
-
|
|
413
|
+
rpc paymentMethodIdGenerator(PaymentMethodIdGeneratorRequest) returns (PaymentMethodIdGeneratorResponse) {}
|
|
398
414
|
}
|