@headspace/protos-events 1.23.0 → 1.25.0
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/lib/index.d.ts +108 -0
- package/lib/index.js +268 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -903,6 +903,102 @@ export namespace subscription {
|
|
|
903
903
|
public toJSON(): { [k: string]: any };
|
|
904
904
|
}
|
|
905
905
|
|
|
906
|
+
/** Properties of a PaymentMethod. */
|
|
907
|
+
interface IPaymentMethod {
|
|
908
|
+
|
|
909
|
+
/** PaymentMethod status */
|
|
910
|
+
status?: (subscription.PaymentMethodStatus|null);
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
/** Represents a PaymentMethod. */
|
|
914
|
+
class PaymentMethod implements IPaymentMethod {
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* Constructs a new PaymentMethod.
|
|
918
|
+
* @param [properties] Properties to set
|
|
919
|
+
*/
|
|
920
|
+
constructor(properties?: subscription.IPaymentMethod);
|
|
921
|
+
|
|
922
|
+
/** PaymentMethod status. */
|
|
923
|
+
public status: subscription.PaymentMethodStatus;
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* Creates a new PaymentMethod instance using the specified properties.
|
|
927
|
+
* @param [properties] Properties to set
|
|
928
|
+
* @returns PaymentMethod instance
|
|
929
|
+
*/
|
|
930
|
+
public static create(properties?: subscription.IPaymentMethod): subscription.PaymentMethod;
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* Encodes the specified PaymentMethod message. Does not implicitly {@link subscription.PaymentMethod.verify|verify} messages.
|
|
934
|
+
* @param message PaymentMethod message or plain object to encode
|
|
935
|
+
* @param [writer] Writer to encode to
|
|
936
|
+
* @returns Writer
|
|
937
|
+
*/
|
|
938
|
+
public static encode(message: subscription.IPaymentMethod, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* Encodes the specified PaymentMethod message, length delimited. Does not implicitly {@link subscription.PaymentMethod.verify|verify} messages.
|
|
942
|
+
* @param message PaymentMethod message or plain object to encode
|
|
943
|
+
* @param [writer] Writer to encode to
|
|
944
|
+
* @returns Writer
|
|
945
|
+
*/
|
|
946
|
+
public static encodeDelimited(message: subscription.IPaymentMethod, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* Decodes a PaymentMethod message from the specified reader or buffer.
|
|
950
|
+
* @param reader Reader or buffer to decode from
|
|
951
|
+
* @param [length] Message length if known beforehand
|
|
952
|
+
* @returns PaymentMethod
|
|
953
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
954
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
955
|
+
*/
|
|
956
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): subscription.PaymentMethod;
|
|
957
|
+
|
|
958
|
+
/**
|
|
959
|
+
* Decodes a PaymentMethod message from the specified reader or buffer, length delimited.
|
|
960
|
+
* @param reader Reader or buffer to decode from
|
|
961
|
+
* @returns PaymentMethod
|
|
962
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
963
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
964
|
+
*/
|
|
965
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): subscription.PaymentMethod;
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* Verifies a PaymentMethod message.
|
|
969
|
+
* @param message Plain object to verify
|
|
970
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
971
|
+
*/
|
|
972
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* Creates a PaymentMethod message from a plain object. Also converts values to their respective internal types.
|
|
976
|
+
* @param object Plain object
|
|
977
|
+
* @returns PaymentMethod
|
|
978
|
+
*/
|
|
979
|
+
public static fromObject(object: { [k: string]: any }): subscription.PaymentMethod;
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* Creates a plain object from a PaymentMethod message. Also converts values to other types if specified.
|
|
983
|
+
* @param message PaymentMethod
|
|
984
|
+
* @param [options] Conversion options
|
|
985
|
+
* @returns Plain object
|
|
986
|
+
*/
|
|
987
|
+
public static toObject(message: subscription.PaymentMethod, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* Converts this PaymentMethod to JSON.
|
|
991
|
+
* @returns JSON object
|
|
992
|
+
*/
|
|
993
|
+
public toJSON(): { [k: string]: any };
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
/** PaymentMethodStatus enum. */
|
|
997
|
+
enum PaymentMethodStatus {
|
|
998
|
+
ACTIVE = 0,
|
|
999
|
+
CLOSED = 1
|
|
1000
|
+
}
|
|
1001
|
+
|
|
906
1002
|
/** Properties of a Plan. */
|
|
907
1003
|
interface IPlan {
|
|
908
1004
|
|
|
@@ -2230,6 +2326,9 @@ export interface ISubscriptionCancelled {
|
|
|
2230
2326
|
|
|
2231
2327
|
/** SubscriptionCancelled userId */
|
|
2232
2328
|
userId?: (string|null);
|
|
2329
|
+
|
|
2330
|
+
/** SubscriptionCancelled paymentMethod */
|
|
2331
|
+
paymentMethod?: (subscription.IPaymentMethod|null);
|
|
2233
2332
|
}
|
|
2234
2333
|
|
|
2235
2334
|
/** Represents a SubscriptionCancelled. */
|
|
@@ -2250,6 +2349,9 @@ export class SubscriptionCancelled implements ISubscriptionCancelled {
|
|
|
2250
2349
|
/** SubscriptionCancelled userId. */
|
|
2251
2350
|
public userId: string;
|
|
2252
2351
|
|
|
2352
|
+
/** SubscriptionCancelled paymentMethod. */
|
|
2353
|
+
public paymentMethod?: (subscription.IPaymentMethod|null);
|
|
2354
|
+
|
|
2253
2355
|
/**
|
|
2254
2356
|
* Creates a new SubscriptionCancelled instance using the specified properties.
|
|
2255
2357
|
* @param [properties] Properties to set
|
|
@@ -2443,6 +2545,9 @@ export interface ISubscriptionUpcomingRenewal {
|
|
|
2443
2545
|
|
|
2444
2546
|
/** SubscriptionUpcomingRenewal renewalDate */
|
|
2445
2547
|
renewalDate?: (number|Long|null);
|
|
2548
|
+
|
|
2549
|
+
/** SubscriptionUpcomingRenewal paymentMethod */
|
|
2550
|
+
paymentMethod?: (subscription.IPaymentMethod|null);
|
|
2446
2551
|
}
|
|
2447
2552
|
|
|
2448
2553
|
/** Represents a SubscriptionUpcomingRenewal. */
|
|
@@ -2472,6 +2577,9 @@ export class SubscriptionUpcomingRenewal implements ISubscriptionUpcomingRenewal
|
|
|
2472
2577
|
/** SubscriptionUpcomingRenewal renewalDate. */
|
|
2473
2578
|
public renewalDate: (number|Long);
|
|
2474
2579
|
|
|
2580
|
+
/** SubscriptionUpcomingRenewal paymentMethod. */
|
|
2581
|
+
public paymentMethod?: (subscription.IPaymentMethod|null);
|
|
2582
|
+
|
|
2475
2583
|
/**
|
|
2476
2584
|
* Creates a new SubscriptionUpcomingRenewal instance using the specified properties.
|
|
2477
2585
|
* @param [properties] Properties to set
|
package/lib/index.js
CHANGED
|
@@ -1995,6 +1995,220 @@ $root.subscription = (function() {
|
|
|
1995
1995
|
return UserSubscriptionResponse;
|
|
1996
1996
|
})();
|
|
1997
1997
|
|
|
1998
|
+
subscription.PaymentMethod = (function() {
|
|
1999
|
+
|
|
2000
|
+
/**
|
|
2001
|
+
* Properties of a PaymentMethod.
|
|
2002
|
+
* @memberof subscription
|
|
2003
|
+
* @interface IPaymentMethod
|
|
2004
|
+
* @property {subscription.PaymentMethodStatus|null} [status] PaymentMethod status
|
|
2005
|
+
*/
|
|
2006
|
+
|
|
2007
|
+
/**
|
|
2008
|
+
* Constructs a new PaymentMethod.
|
|
2009
|
+
* @memberof subscription
|
|
2010
|
+
* @classdesc Represents a PaymentMethod.
|
|
2011
|
+
* @implements IPaymentMethod
|
|
2012
|
+
* @constructor
|
|
2013
|
+
* @param {subscription.IPaymentMethod=} [properties] Properties to set
|
|
2014
|
+
*/
|
|
2015
|
+
function PaymentMethod(properties) {
|
|
2016
|
+
if (properties)
|
|
2017
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
2018
|
+
if (properties[keys[i]] != null)
|
|
2019
|
+
this[keys[i]] = properties[keys[i]];
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
/**
|
|
2023
|
+
* PaymentMethod status.
|
|
2024
|
+
* @member {subscription.PaymentMethodStatus} status
|
|
2025
|
+
* @memberof subscription.PaymentMethod
|
|
2026
|
+
* @instance
|
|
2027
|
+
*/
|
|
2028
|
+
PaymentMethod.prototype.status = 0;
|
|
2029
|
+
|
|
2030
|
+
/**
|
|
2031
|
+
* Creates a new PaymentMethod instance using the specified properties.
|
|
2032
|
+
* @function create
|
|
2033
|
+
* @memberof subscription.PaymentMethod
|
|
2034
|
+
* @static
|
|
2035
|
+
* @param {subscription.IPaymentMethod=} [properties] Properties to set
|
|
2036
|
+
* @returns {subscription.PaymentMethod} PaymentMethod instance
|
|
2037
|
+
*/
|
|
2038
|
+
PaymentMethod.create = function create(properties) {
|
|
2039
|
+
return new PaymentMethod(properties);
|
|
2040
|
+
};
|
|
2041
|
+
|
|
2042
|
+
/**
|
|
2043
|
+
* Encodes the specified PaymentMethod message. Does not implicitly {@link subscription.PaymentMethod.verify|verify} messages.
|
|
2044
|
+
* @function encode
|
|
2045
|
+
* @memberof subscription.PaymentMethod
|
|
2046
|
+
* @static
|
|
2047
|
+
* @param {subscription.IPaymentMethod} message PaymentMethod message or plain object to encode
|
|
2048
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2049
|
+
* @returns {$protobuf.Writer} Writer
|
|
2050
|
+
*/
|
|
2051
|
+
PaymentMethod.encode = function encode(message, writer) {
|
|
2052
|
+
if (!writer)
|
|
2053
|
+
writer = $Writer.create();
|
|
2054
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
2055
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status);
|
|
2056
|
+
return writer;
|
|
2057
|
+
};
|
|
2058
|
+
|
|
2059
|
+
/**
|
|
2060
|
+
* Encodes the specified PaymentMethod message, length delimited. Does not implicitly {@link subscription.PaymentMethod.verify|verify} messages.
|
|
2061
|
+
* @function encodeDelimited
|
|
2062
|
+
* @memberof subscription.PaymentMethod
|
|
2063
|
+
* @static
|
|
2064
|
+
* @param {subscription.IPaymentMethod} message PaymentMethod message or plain object to encode
|
|
2065
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
2066
|
+
* @returns {$protobuf.Writer} Writer
|
|
2067
|
+
*/
|
|
2068
|
+
PaymentMethod.encodeDelimited = function encodeDelimited(message, writer) {
|
|
2069
|
+
return this.encode(message, writer).ldelim();
|
|
2070
|
+
};
|
|
2071
|
+
|
|
2072
|
+
/**
|
|
2073
|
+
* Decodes a PaymentMethod message from the specified reader or buffer.
|
|
2074
|
+
* @function decode
|
|
2075
|
+
* @memberof subscription.PaymentMethod
|
|
2076
|
+
* @static
|
|
2077
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2078
|
+
* @param {number} [length] Message length if known beforehand
|
|
2079
|
+
* @returns {subscription.PaymentMethod} PaymentMethod
|
|
2080
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2081
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2082
|
+
*/
|
|
2083
|
+
PaymentMethod.decode = function decode(reader, length) {
|
|
2084
|
+
if (!(reader instanceof $Reader))
|
|
2085
|
+
reader = $Reader.create(reader);
|
|
2086
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.subscription.PaymentMethod();
|
|
2087
|
+
while (reader.pos < end) {
|
|
2088
|
+
var tag = reader.uint32();
|
|
2089
|
+
switch (tag >>> 3) {
|
|
2090
|
+
case 1:
|
|
2091
|
+
message.status = reader.int32();
|
|
2092
|
+
break;
|
|
2093
|
+
default:
|
|
2094
|
+
reader.skipType(tag & 7);
|
|
2095
|
+
break;
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
return message;
|
|
2099
|
+
};
|
|
2100
|
+
|
|
2101
|
+
/**
|
|
2102
|
+
* Decodes a PaymentMethod message from the specified reader or buffer, length delimited.
|
|
2103
|
+
* @function decodeDelimited
|
|
2104
|
+
* @memberof subscription.PaymentMethod
|
|
2105
|
+
* @static
|
|
2106
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
2107
|
+
* @returns {subscription.PaymentMethod} PaymentMethod
|
|
2108
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2109
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2110
|
+
*/
|
|
2111
|
+
PaymentMethod.decodeDelimited = function decodeDelimited(reader) {
|
|
2112
|
+
if (!(reader instanceof $Reader))
|
|
2113
|
+
reader = new $Reader(reader);
|
|
2114
|
+
return this.decode(reader, reader.uint32());
|
|
2115
|
+
};
|
|
2116
|
+
|
|
2117
|
+
/**
|
|
2118
|
+
* Verifies a PaymentMethod message.
|
|
2119
|
+
* @function verify
|
|
2120
|
+
* @memberof subscription.PaymentMethod
|
|
2121
|
+
* @static
|
|
2122
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
2123
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
2124
|
+
*/
|
|
2125
|
+
PaymentMethod.verify = function verify(message) {
|
|
2126
|
+
if (typeof message !== "object" || message === null)
|
|
2127
|
+
return "object expected";
|
|
2128
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
2129
|
+
switch (message.status) {
|
|
2130
|
+
default:
|
|
2131
|
+
return "status: enum value expected";
|
|
2132
|
+
case 0:
|
|
2133
|
+
case 1:
|
|
2134
|
+
break;
|
|
2135
|
+
}
|
|
2136
|
+
return null;
|
|
2137
|
+
};
|
|
2138
|
+
|
|
2139
|
+
/**
|
|
2140
|
+
* Creates a PaymentMethod message from a plain object. Also converts values to their respective internal types.
|
|
2141
|
+
* @function fromObject
|
|
2142
|
+
* @memberof subscription.PaymentMethod
|
|
2143
|
+
* @static
|
|
2144
|
+
* @param {Object.<string,*>} object Plain object
|
|
2145
|
+
* @returns {subscription.PaymentMethod} PaymentMethod
|
|
2146
|
+
*/
|
|
2147
|
+
PaymentMethod.fromObject = function fromObject(object) {
|
|
2148
|
+
if (object instanceof $root.subscription.PaymentMethod)
|
|
2149
|
+
return object;
|
|
2150
|
+
var message = new $root.subscription.PaymentMethod();
|
|
2151
|
+
switch (object.status) {
|
|
2152
|
+
case "ACTIVE":
|
|
2153
|
+
case 0:
|
|
2154
|
+
message.status = 0;
|
|
2155
|
+
break;
|
|
2156
|
+
case "CLOSED":
|
|
2157
|
+
case 1:
|
|
2158
|
+
message.status = 1;
|
|
2159
|
+
break;
|
|
2160
|
+
}
|
|
2161
|
+
return message;
|
|
2162
|
+
};
|
|
2163
|
+
|
|
2164
|
+
/**
|
|
2165
|
+
* Creates a plain object from a PaymentMethod message. Also converts values to other types if specified.
|
|
2166
|
+
* @function toObject
|
|
2167
|
+
* @memberof subscription.PaymentMethod
|
|
2168
|
+
* @static
|
|
2169
|
+
* @param {subscription.PaymentMethod} message PaymentMethod
|
|
2170
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
2171
|
+
* @returns {Object.<string,*>} Plain object
|
|
2172
|
+
*/
|
|
2173
|
+
PaymentMethod.toObject = function toObject(message, options) {
|
|
2174
|
+
if (!options)
|
|
2175
|
+
options = {};
|
|
2176
|
+
var object = {};
|
|
2177
|
+
if (options.defaults)
|
|
2178
|
+
object.status = options.enums === String ? "ACTIVE" : 0;
|
|
2179
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
2180
|
+
object.status = options.enums === String ? $root.subscription.PaymentMethodStatus[message.status] : message.status;
|
|
2181
|
+
return object;
|
|
2182
|
+
};
|
|
2183
|
+
|
|
2184
|
+
/**
|
|
2185
|
+
* Converts this PaymentMethod to JSON.
|
|
2186
|
+
* @function toJSON
|
|
2187
|
+
* @memberof subscription.PaymentMethod
|
|
2188
|
+
* @instance
|
|
2189
|
+
* @returns {Object.<string,*>} JSON object
|
|
2190
|
+
*/
|
|
2191
|
+
PaymentMethod.prototype.toJSON = function toJSON() {
|
|
2192
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
2193
|
+
};
|
|
2194
|
+
|
|
2195
|
+
return PaymentMethod;
|
|
2196
|
+
})();
|
|
2197
|
+
|
|
2198
|
+
/**
|
|
2199
|
+
* PaymentMethodStatus enum.
|
|
2200
|
+
* @name subscription.PaymentMethodStatus
|
|
2201
|
+
* @enum {string}
|
|
2202
|
+
* @property {number} ACTIVE=0 ACTIVE value
|
|
2203
|
+
* @property {number} CLOSED=1 CLOSED value
|
|
2204
|
+
*/
|
|
2205
|
+
subscription.PaymentMethodStatus = (function() {
|
|
2206
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
2207
|
+
values[valuesById[0] = "ACTIVE"] = 0;
|
|
2208
|
+
values[valuesById[1] = "CLOSED"] = 1;
|
|
2209
|
+
return values;
|
|
2210
|
+
})();
|
|
2211
|
+
|
|
1998
2212
|
subscription.Plan = (function() {
|
|
1999
2213
|
|
|
2000
2214
|
/**
|
|
@@ -5283,6 +5497,7 @@ $root.SubscriptionCancelled = (function() {
|
|
|
5283
5497
|
* @property {number|null} [id] SubscriptionCancelled id
|
|
5284
5498
|
* @property {number|Long|null} [updatedOn] SubscriptionCancelled updatedOn
|
|
5285
5499
|
* @property {string|null} [userId] SubscriptionCancelled userId
|
|
5500
|
+
* @property {subscription.IPaymentMethod|null} [paymentMethod] SubscriptionCancelled paymentMethod
|
|
5286
5501
|
*/
|
|
5287
5502
|
|
|
5288
5503
|
/**
|
|
@@ -5324,6 +5539,14 @@ $root.SubscriptionCancelled = (function() {
|
|
|
5324
5539
|
*/
|
|
5325
5540
|
SubscriptionCancelled.prototype.userId = "";
|
|
5326
5541
|
|
|
5542
|
+
/**
|
|
5543
|
+
* SubscriptionCancelled paymentMethod.
|
|
5544
|
+
* @member {subscription.IPaymentMethod|null|undefined} paymentMethod
|
|
5545
|
+
* @memberof SubscriptionCancelled
|
|
5546
|
+
* @instance
|
|
5547
|
+
*/
|
|
5548
|
+
SubscriptionCancelled.prototype.paymentMethod = null;
|
|
5549
|
+
|
|
5327
5550
|
/**
|
|
5328
5551
|
* Creates a new SubscriptionCancelled instance using the specified properties.
|
|
5329
5552
|
* @function create
|
|
@@ -5354,6 +5577,8 @@ $root.SubscriptionCancelled = (function() {
|
|
|
5354
5577
|
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.updatedOn);
|
|
5355
5578
|
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
5356
5579
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.userId);
|
|
5580
|
+
if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod"))
|
|
5581
|
+
$root.subscription.PaymentMethod.encode(message.paymentMethod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
5357
5582
|
return writer;
|
|
5358
5583
|
};
|
|
5359
5584
|
|
|
@@ -5397,6 +5622,9 @@ $root.SubscriptionCancelled = (function() {
|
|
|
5397
5622
|
case 3:
|
|
5398
5623
|
message.userId = reader.string();
|
|
5399
5624
|
break;
|
|
5625
|
+
case 4:
|
|
5626
|
+
message.paymentMethod = $root.subscription.PaymentMethod.decode(reader, reader.uint32());
|
|
5627
|
+
break;
|
|
5400
5628
|
default:
|
|
5401
5629
|
reader.skipType(tag & 7);
|
|
5402
5630
|
break;
|
|
@@ -5441,6 +5669,11 @@ $root.SubscriptionCancelled = (function() {
|
|
|
5441
5669
|
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
5442
5670
|
if (!$util.isString(message.userId))
|
|
5443
5671
|
return "userId: string expected";
|
|
5672
|
+
if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod")) {
|
|
5673
|
+
var error = $root.subscription.PaymentMethod.verify(message.paymentMethod);
|
|
5674
|
+
if (error)
|
|
5675
|
+
return "paymentMethod." + error;
|
|
5676
|
+
}
|
|
5444
5677
|
return null;
|
|
5445
5678
|
};
|
|
5446
5679
|
|
|
@@ -5469,6 +5702,11 @@ $root.SubscriptionCancelled = (function() {
|
|
|
5469
5702
|
message.updatedOn = new $util.LongBits(object.updatedOn.low >>> 0, object.updatedOn.high >>> 0).toNumber(true);
|
|
5470
5703
|
if (object.userId != null)
|
|
5471
5704
|
message.userId = String(object.userId);
|
|
5705
|
+
if (object.paymentMethod != null) {
|
|
5706
|
+
if (typeof object.paymentMethod !== "object")
|
|
5707
|
+
throw TypeError(".SubscriptionCancelled.paymentMethod: object expected");
|
|
5708
|
+
message.paymentMethod = $root.subscription.PaymentMethod.fromObject(object.paymentMethod);
|
|
5709
|
+
}
|
|
5472
5710
|
return message;
|
|
5473
5711
|
};
|
|
5474
5712
|
|
|
@@ -5493,6 +5731,7 @@ $root.SubscriptionCancelled = (function() {
|
|
|
5493
5731
|
} else
|
|
5494
5732
|
object.updatedOn = options.longs === String ? "0" : 0;
|
|
5495
5733
|
object.userId = "";
|
|
5734
|
+
object.paymentMethod = null;
|
|
5496
5735
|
}
|
|
5497
5736
|
if (message.id != null && message.hasOwnProperty("id"))
|
|
5498
5737
|
object.id = message.id;
|
|
@@ -5503,6 +5742,8 @@ $root.SubscriptionCancelled = (function() {
|
|
|
5503
5742
|
object.updatedOn = options.longs === String ? $util.Long.prototype.toString.call(message.updatedOn) : options.longs === Number ? new $util.LongBits(message.updatedOn.low >>> 0, message.updatedOn.high >>> 0).toNumber(true) : message.updatedOn;
|
|
5504
5743
|
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
5505
5744
|
object.userId = message.userId;
|
|
5745
|
+
if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod"))
|
|
5746
|
+
object.paymentMethod = $root.subscription.PaymentMethod.toObject(message.paymentMethod, options);
|
|
5506
5747
|
return object;
|
|
5507
5748
|
};
|
|
5508
5749
|
|
|
@@ -5778,6 +6019,7 @@ $root.SubscriptionUpcomingRenewal = (function() {
|
|
|
5778
6019
|
* @property {subscription.SubscriptionMembership|null} [membership] SubscriptionUpcomingRenewal membership
|
|
5779
6020
|
* @property {subscription.PlanAffiliation|null} [planAffiliation] SubscriptionUpcomingRenewal planAffiliation
|
|
5780
6021
|
* @property {number|Long|null} [renewalDate] SubscriptionUpcomingRenewal renewalDate
|
|
6022
|
+
* @property {subscription.IPaymentMethod|null} [paymentMethod] SubscriptionUpcomingRenewal paymentMethod
|
|
5781
6023
|
*/
|
|
5782
6024
|
|
|
5783
6025
|
/**
|
|
@@ -5843,6 +6085,14 @@ $root.SubscriptionUpcomingRenewal = (function() {
|
|
|
5843
6085
|
*/
|
|
5844
6086
|
SubscriptionUpcomingRenewal.prototype.renewalDate = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
5845
6087
|
|
|
6088
|
+
/**
|
|
6089
|
+
* SubscriptionUpcomingRenewal paymentMethod.
|
|
6090
|
+
* @member {subscription.IPaymentMethod|null|undefined} paymentMethod
|
|
6091
|
+
* @memberof SubscriptionUpcomingRenewal
|
|
6092
|
+
* @instance
|
|
6093
|
+
*/
|
|
6094
|
+
SubscriptionUpcomingRenewal.prototype.paymentMethod = null;
|
|
6095
|
+
|
|
5846
6096
|
/**
|
|
5847
6097
|
* Creates a new SubscriptionUpcomingRenewal instance using the specified properties.
|
|
5848
6098
|
* @function create
|
|
@@ -5879,6 +6129,8 @@ $root.SubscriptionUpcomingRenewal = (function() {
|
|
|
5879
6129
|
writer.uint32(/* id 5, wireType 0 =*/40).int32(message.planAffiliation);
|
|
5880
6130
|
if (message.renewalDate != null && message.hasOwnProperty("renewalDate"))
|
|
5881
6131
|
writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.renewalDate);
|
|
6132
|
+
if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod"))
|
|
6133
|
+
$root.subscription.PaymentMethod.encode(message.paymentMethod, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
|
5882
6134
|
return writer;
|
|
5883
6135
|
};
|
|
5884
6136
|
|
|
@@ -5931,6 +6183,9 @@ $root.SubscriptionUpcomingRenewal = (function() {
|
|
|
5931
6183
|
case 6:
|
|
5932
6184
|
message.renewalDate = reader.uint64();
|
|
5933
6185
|
break;
|
|
6186
|
+
case 7:
|
|
6187
|
+
message.paymentMethod = $root.subscription.PaymentMethod.decode(reader, reader.uint32());
|
|
6188
|
+
break;
|
|
5934
6189
|
default:
|
|
5935
6190
|
reader.skipType(tag & 7);
|
|
5936
6191
|
break;
|
|
@@ -5995,6 +6250,11 @@ $root.SubscriptionUpcomingRenewal = (function() {
|
|
|
5995
6250
|
if (message.renewalDate != null && message.hasOwnProperty("renewalDate"))
|
|
5996
6251
|
if (!$util.isInteger(message.renewalDate) && !(message.renewalDate && $util.isInteger(message.renewalDate.low) && $util.isInteger(message.renewalDate.high)))
|
|
5997
6252
|
return "renewalDate: integer|Long expected";
|
|
6253
|
+
if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod")) {
|
|
6254
|
+
var error = $root.subscription.PaymentMethod.verify(message.paymentMethod);
|
|
6255
|
+
if (error)
|
|
6256
|
+
return "paymentMethod." + error;
|
|
6257
|
+
}
|
|
5998
6258
|
return null;
|
|
5999
6259
|
};
|
|
6000
6260
|
|
|
@@ -6049,6 +6309,11 @@ $root.SubscriptionUpcomingRenewal = (function() {
|
|
|
6049
6309
|
message.renewalDate = object.renewalDate;
|
|
6050
6310
|
else if (typeof object.renewalDate === "object")
|
|
6051
6311
|
message.renewalDate = new $util.LongBits(object.renewalDate.low >>> 0, object.renewalDate.high >>> 0).toNumber(true);
|
|
6312
|
+
if (object.paymentMethod != null) {
|
|
6313
|
+
if (typeof object.paymentMethod !== "object")
|
|
6314
|
+
throw TypeError(".SubscriptionUpcomingRenewal.paymentMethod: object expected");
|
|
6315
|
+
message.paymentMethod = $root.subscription.PaymentMethod.fromObject(object.paymentMethod);
|
|
6316
|
+
}
|
|
6052
6317
|
return message;
|
|
6053
6318
|
};
|
|
6054
6319
|
|
|
@@ -6076,6 +6341,7 @@ $root.SubscriptionUpcomingRenewal = (function() {
|
|
|
6076
6341
|
object.renewalDate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
6077
6342
|
} else
|
|
6078
6343
|
object.renewalDate = options.longs === String ? "0" : 0;
|
|
6344
|
+
object.paymentMethod = null;
|
|
6079
6345
|
}
|
|
6080
6346
|
if (message.id != null && message.hasOwnProperty("id"))
|
|
6081
6347
|
object.id = message.id;
|
|
@@ -6092,6 +6358,8 @@ $root.SubscriptionUpcomingRenewal = (function() {
|
|
|
6092
6358
|
object.renewalDate = options.longs === String ? String(message.renewalDate) : message.renewalDate;
|
|
6093
6359
|
else
|
|
6094
6360
|
object.renewalDate = options.longs === String ? $util.Long.prototype.toString.call(message.renewalDate) : options.longs === Number ? new $util.LongBits(message.renewalDate.low >>> 0, message.renewalDate.high >>> 0).toNumber(true) : message.renewalDate;
|
|
6361
|
+
if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod"))
|
|
6362
|
+
object.paymentMethod = $root.subscription.PaymentMethod.toObject(message.paymentMethod, options);
|
|
6095
6363
|
return object;
|
|
6096
6364
|
};
|
|
6097
6365
|
|
package/package.json
CHANGED