@sellout/models 0.0.184 → 0.0.185
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/graphql/mutations/sendSeasonOrderReceiptEmail.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/sendSeasonOrderReceiptEmail.mutation.js +13 -0
- package/.dist/graphql/mutations/sendSeasonOrderReceiptEmail.mutation.js.map +1 -0
- package/.dist/interfaces/ICreateOrderParams.d.ts +2 -0
- package/.dist/interfaces/IOrder.d.ts +2 -1
- package/.dist/interfaces/IOrder.js.map +1 -1
- package/.dist/interfaces/IOrderSummary.d.ts +1 -0
- package/.dist/schemas/Order.d.ts +81 -0
- package/.dist/schemas/Order.js +81 -0
- package/.dist/schemas/Order.js.map +1 -1
- package/.dist/sellout-proto.js +628 -6
- package/.dist/utils/OrderUtil.js +1 -123
- package/.dist/utils/OrderUtil.js.map +1 -1
- package/.dist/utils/PaymentUtil.d.ts +1 -2
- package/.dist/utils/PaymentUtil.js +180 -198
- package/.dist/utils/PaymentUtil.js.map +1 -1
- package/package.json +3 -3
- package/src/graphql/mutations/sendSeasonOrderReceiptEmail.mutation.ts +9 -0
- package/src/interfaces/ICreateOrderParams.ts +2 -0
- package/src/interfaces/IOrder.ts +2 -1
- package/src/interfaces/IOrderSummary.ts +1 -0
- package/src/proto/order.proto +24 -1
- package/src/schemas/Order.ts +81 -0
- package/src/utils/OrderUtil.ts +1 -137
- package/src/utils/PaymentUtil.ts +221 -269
package/.dist/sellout-proto.js
CHANGED
|
@@ -13009,6 +13009,7 @@ $root.Order = (function() {
|
|
|
13009
13009
|
* @property {boolean|null} [hidden] Order hidden
|
|
13010
13010
|
* @property {boolean|null} [printed] Order printed
|
|
13011
13011
|
* @property {string|null} [parentSeasonOrderId] Order parentSeasonOrderId
|
|
13012
|
+
* @property {Array.<IorderFees>|null} [fees] Order fees
|
|
13012
13013
|
*/
|
|
13013
13014
|
|
|
13014
13015
|
/**
|
|
@@ -13028,6 +13029,7 @@ $root.Order = (function() {
|
|
|
13028
13029
|
this.recipientEmails = [];
|
|
13029
13030
|
this.customFields = [];
|
|
13030
13031
|
this.payments = [];
|
|
13032
|
+
this.fees = [];
|
|
13031
13033
|
if (properties)
|
|
13032
13034
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
13033
13035
|
if (properties[keys[i]] != null)
|
|
@@ -13282,6 +13284,14 @@ $root.Order = (function() {
|
|
|
13282
13284
|
*/
|
|
13283
13285
|
Order.prototype.parentSeasonOrderId = "";
|
|
13284
13286
|
|
|
13287
|
+
/**
|
|
13288
|
+
* Order fees.
|
|
13289
|
+
* @member {Array.<IorderFees>} fees
|
|
13290
|
+
* @memberof Order
|
|
13291
|
+
* @instance
|
|
13292
|
+
*/
|
|
13293
|
+
Order.prototype.fees = $util.emptyArray;
|
|
13294
|
+
|
|
13285
13295
|
/**
|
|
13286
13296
|
* Creates a new Order instance using the specified properties.
|
|
13287
13297
|
* @function create
|
|
@@ -13376,6 +13386,9 @@ $root.Order = (function() {
|
|
|
13376
13386
|
writer.uint32(/* id 29, wireType 0 =*/232).bool(message.printed);
|
|
13377
13387
|
if (message.parentSeasonOrderId != null && Object.hasOwnProperty.call(message, "parentSeasonOrderId"))
|
|
13378
13388
|
writer.uint32(/* id 30, wireType 2 =*/242).string(message.parentSeasonOrderId);
|
|
13389
|
+
if (message.fees != null && message.fees.length)
|
|
13390
|
+
for (var i = 0; i < message.fees.length; ++i)
|
|
13391
|
+
$root.orderFees.encode(message.fees[i], writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim();
|
|
13379
13392
|
return writer;
|
|
13380
13393
|
};
|
|
13381
13394
|
|
|
@@ -13519,6 +13532,11 @@ $root.Order = (function() {
|
|
|
13519
13532
|
case 30:
|
|
13520
13533
|
message.parentSeasonOrderId = reader.string();
|
|
13521
13534
|
break;
|
|
13535
|
+
case 31:
|
|
13536
|
+
if (!(message.fees && message.fees.length))
|
|
13537
|
+
message.fees = [];
|
|
13538
|
+
message.fees.push($root.orderFees.decode(reader, reader.uint32()));
|
|
13539
|
+
break;
|
|
13522
13540
|
default:
|
|
13523
13541
|
reader.skipType(tag & 7);
|
|
13524
13542
|
break;
|
|
@@ -13691,6 +13709,15 @@ $root.Order = (function() {
|
|
|
13691
13709
|
if (message.parentSeasonOrderId != null && message.hasOwnProperty("parentSeasonOrderId"))
|
|
13692
13710
|
if (!$util.isString(message.parentSeasonOrderId))
|
|
13693
13711
|
return "parentSeasonOrderId: string expected";
|
|
13712
|
+
if (message.fees != null && message.hasOwnProperty("fees")) {
|
|
13713
|
+
if (!Array.isArray(message.fees))
|
|
13714
|
+
return "fees: array expected";
|
|
13715
|
+
for (var i = 0; i < message.fees.length; ++i) {
|
|
13716
|
+
var error = $root.orderFees.verify(message.fees[i]);
|
|
13717
|
+
if (error)
|
|
13718
|
+
return "fees." + error;
|
|
13719
|
+
}
|
|
13720
|
+
}
|
|
13694
13721
|
return null;
|
|
13695
13722
|
};
|
|
13696
13723
|
|
|
@@ -13826,6 +13853,16 @@ $root.Order = (function() {
|
|
|
13826
13853
|
message.printed = Boolean(object.printed);
|
|
13827
13854
|
if (object.parentSeasonOrderId != null)
|
|
13828
13855
|
message.parentSeasonOrderId = String(object.parentSeasonOrderId);
|
|
13856
|
+
if (object.fees) {
|
|
13857
|
+
if (!Array.isArray(object.fees))
|
|
13858
|
+
throw TypeError(".Order.fees: array expected");
|
|
13859
|
+
message.fees = [];
|
|
13860
|
+
for (var i = 0; i < object.fees.length; ++i) {
|
|
13861
|
+
if (typeof object.fees[i] !== "object")
|
|
13862
|
+
throw TypeError(".Order.fees: object expected");
|
|
13863
|
+
message.fees[i] = $root.orderFees.fromObject(object.fees[i]);
|
|
13864
|
+
}
|
|
13865
|
+
}
|
|
13829
13866
|
return message;
|
|
13830
13867
|
};
|
|
13831
13868
|
|
|
@@ -13851,6 +13888,7 @@ $root.Order = (function() {
|
|
|
13851
13888
|
object.recipientEmails = [];
|
|
13852
13889
|
object.customFields = [];
|
|
13853
13890
|
object.payments = [];
|
|
13891
|
+
object.fees = [];
|
|
13854
13892
|
}
|
|
13855
13893
|
if (options.defaults) {
|
|
13856
13894
|
object._id = "";
|
|
@@ -13963,6 +14001,11 @@ $root.Order = (function() {
|
|
|
13963
14001
|
object.printed = message.printed;
|
|
13964
14002
|
if (message.parentSeasonOrderId != null && message.hasOwnProperty("parentSeasonOrderId"))
|
|
13965
14003
|
object.parentSeasonOrderId = message.parentSeasonOrderId;
|
|
14004
|
+
if (message.fees && message.fees.length) {
|
|
14005
|
+
object.fees = [];
|
|
14006
|
+
for (var j = 0; j < message.fees.length; ++j)
|
|
14007
|
+
object.fees[j] = $root.orderFees.toObject(message.fees[j], options);
|
|
14008
|
+
}
|
|
13966
14009
|
return object;
|
|
13967
14010
|
};
|
|
13968
14011
|
|
|
@@ -14828,6 +14871,585 @@ $root.OrderTicket = (function() {
|
|
|
14828
14871
|
return OrderTicket;
|
|
14829
14872
|
})();
|
|
14830
14873
|
|
|
14874
|
+
$root.orderFees = (function() {
|
|
14875
|
+
|
|
14876
|
+
/**
|
|
14877
|
+
* Properties of an orderFees.
|
|
14878
|
+
* @exports IorderFees
|
|
14879
|
+
* @interface IorderFees
|
|
14880
|
+
* @property {string|null} [_id] orderFees _id
|
|
14881
|
+
* @property {string|null} [name] orderFees name
|
|
14882
|
+
* @property {string|null} [orgId] orderFees orgId
|
|
14883
|
+
* @property {string|null} [eventId] orderFees eventId
|
|
14884
|
+
* @property {string|null} [type] orderFees type
|
|
14885
|
+
* @property {number|null} [value] orderFees value
|
|
14886
|
+
* @property {string|null} [appliedTo] orderFees appliedTo
|
|
14887
|
+
* @property {string|null} [appliedBy] orderFees appliedBy
|
|
14888
|
+
* @property {number|null} [minAppliedToPrice] orderFees minAppliedToPrice
|
|
14889
|
+
* @property {number|null} [maxAppliedToPrice] orderFees maxAppliedToPrice
|
|
14890
|
+
* @property {Array.<string>|null} [filters] orderFees filters
|
|
14891
|
+
* @property {string|null} [createdBy] orderFees createdBy
|
|
14892
|
+
* @property {number|null} [createdAt] orderFees createdAt
|
|
14893
|
+
* @property {string|null} [updatedBy] orderFees updatedBy
|
|
14894
|
+
* @property {number|null} [updatedAt] orderFees updatedAt
|
|
14895
|
+
* @property {boolean|null} [disabled] orderFees disabled
|
|
14896
|
+
* @property {string|null} [seasonId] orderFees seasonId
|
|
14897
|
+
* @property {number|null} [amount] orderFees amount
|
|
14898
|
+
*/
|
|
14899
|
+
|
|
14900
|
+
/**
|
|
14901
|
+
* Constructs a new orderFees.
|
|
14902
|
+
* @exports orderFees
|
|
14903
|
+
* @classdesc Represents an orderFees.
|
|
14904
|
+
* @implements IorderFees
|
|
14905
|
+
* @constructor
|
|
14906
|
+
* @param {IorderFees=} [properties] Properties to set
|
|
14907
|
+
*/
|
|
14908
|
+
function orderFees(properties) {
|
|
14909
|
+
this.filters = [];
|
|
14910
|
+
if (properties)
|
|
14911
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
14912
|
+
if (properties[keys[i]] != null)
|
|
14913
|
+
this[keys[i]] = properties[keys[i]];
|
|
14914
|
+
}
|
|
14915
|
+
|
|
14916
|
+
/**
|
|
14917
|
+
* orderFees _id.
|
|
14918
|
+
* @member {string} _id
|
|
14919
|
+
* @memberof orderFees
|
|
14920
|
+
* @instance
|
|
14921
|
+
*/
|
|
14922
|
+
orderFees.prototype._id = "";
|
|
14923
|
+
|
|
14924
|
+
/**
|
|
14925
|
+
* orderFees name.
|
|
14926
|
+
* @member {string} name
|
|
14927
|
+
* @memberof orderFees
|
|
14928
|
+
* @instance
|
|
14929
|
+
*/
|
|
14930
|
+
orderFees.prototype.name = "";
|
|
14931
|
+
|
|
14932
|
+
/**
|
|
14933
|
+
* orderFees orgId.
|
|
14934
|
+
* @member {string} orgId
|
|
14935
|
+
* @memberof orderFees
|
|
14936
|
+
* @instance
|
|
14937
|
+
*/
|
|
14938
|
+
orderFees.prototype.orgId = "";
|
|
14939
|
+
|
|
14940
|
+
/**
|
|
14941
|
+
* orderFees eventId.
|
|
14942
|
+
* @member {string} eventId
|
|
14943
|
+
* @memberof orderFees
|
|
14944
|
+
* @instance
|
|
14945
|
+
*/
|
|
14946
|
+
orderFees.prototype.eventId = "";
|
|
14947
|
+
|
|
14948
|
+
/**
|
|
14949
|
+
* orderFees type.
|
|
14950
|
+
* @member {string} type
|
|
14951
|
+
* @memberof orderFees
|
|
14952
|
+
* @instance
|
|
14953
|
+
*/
|
|
14954
|
+
orderFees.prototype.type = "";
|
|
14955
|
+
|
|
14956
|
+
/**
|
|
14957
|
+
* orderFees value.
|
|
14958
|
+
* @member {number} value
|
|
14959
|
+
* @memberof orderFees
|
|
14960
|
+
* @instance
|
|
14961
|
+
*/
|
|
14962
|
+
orderFees.prototype.value = 0;
|
|
14963
|
+
|
|
14964
|
+
/**
|
|
14965
|
+
* orderFees appliedTo.
|
|
14966
|
+
* @member {string} appliedTo
|
|
14967
|
+
* @memberof orderFees
|
|
14968
|
+
* @instance
|
|
14969
|
+
*/
|
|
14970
|
+
orderFees.prototype.appliedTo = "";
|
|
14971
|
+
|
|
14972
|
+
/**
|
|
14973
|
+
* orderFees appliedBy.
|
|
14974
|
+
* @member {string} appliedBy
|
|
14975
|
+
* @memberof orderFees
|
|
14976
|
+
* @instance
|
|
14977
|
+
*/
|
|
14978
|
+
orderFees.prototype.appliedBy = "";
|
|
14979
|
+
|
|
14980
|
+
/**
|
|
14981
|
+
* orderFees minAppliedToPrice.
|
|
14982
|
+
* @member {number} minAppliedToPrice
|
|
14983
|
+
* @memberof orderFees
|
|
14984
|
+
* @instance
|
|
14985
|
+
*/
|
|
14986
|
+
orderFees.prototype.minAppliedToPrice = 0;
|
|
14987
|
+
|
|
14988
|
+
/**
|
|
14989
|
+
* orderFees maxAppliedToPrice.
|
|
14990
|
+
* @member {number} maxAppliedToPrice
|
|
14991
|
+
* @memberof orderFees
|
|
14992
|
+
* @instance
|
|
14993
|
+
*/
|
|
14994
|
+
orderFees.prototype.maxAppliedToPrice = 0;
|
|
14995
|
+
|
|
14996
|
+
/**
|
|
14997
|
+
* orderFees filters.
|
|
14998
|
+
* @member {Array.<string>} filters
|
|
14999
|
+
* @memberof orderFees
|
|
15000
|
+
* @instance
|
|
15001
|
+
*/
|
|
15002
|
+
orderFees.prototype.filters = $util.emptyArray;
|
|
15003
|
+
|
|
15004
|
+
/**
|
|
15005
|
+
* orderFees createdBy.
|
|
15006
|
+
* @member {string} createdBy
|
|
15007
|
+
* @memberof orderFees
|
|
15008
|
+
* @instance
|
|
15009
|
+
*/
|
|
15010
|
+
orderFees.prototype.createdBy = "";
|
|
15011
|
+
|
|
15012
|
+
/**
|
|
15013
|
+
* orderFees createdAt.
|
|
15014
|
+
* @member {number} createdAt
|
|
15015
|
+
* @memberof orderFees
|
|
15016
|
+
* @instance
|
|
15017
|
+
*/
|
|
15018
|
+
orderFees.prototype.createdAt = 0;
|
|
15019
|
+
|
|
15020
|
+
/**
|
|
15021
|
+
* orderFees updatedBy.
|
|
15022
|
+
* @member {string} updatedBy
|
|
15023
|
+
* @memberof orderFees
|
|
15024
|
+
* @instance
|
|
15025
|
+
*/
|
|
15026
|
+
orderFees.prototype.updatedBy = "";
|
|
15027
|
+
|
|
15028
|
+
/**
|
|
15029
|
+
* orderFees updatedAt.
|
|
15030
|
+
* @member {number} updatedAt
|
|
15031
|
+
* @memberof orderFees
|
|
15032
|
+
* @instance
|
|
15033
|
+
*/
|
|
15034
|
+
orderFees.prototype.updatedAt = 0;
|
|
15035
|
+
|
|
15036
|
+
/**
|
|
15037
|
+
* orderFees disabled.
|
|
15038
|
+
* @member {boolean} disabled
|
|
15039
|
+
* @memberof orderFees
|
|
15040
|
+
* @instance
|
|
15041
|
+
*/
|
|
15042
|
+
orderFees.prototype.disabled = false;
|
|
15043
|
+
|
|
15044
|
+
/**
|
|
15045
|
+
* orderFees seasonId.
|
|
15046
|
+
* @member {string} seasonId
|
|
15047
|
+
* @memberof orderFees
|
|
15048
|
+
* @instance
|
|
15049
|
+
*/
|
|
15050
|
+
orderFees.prototype.seasonId = "";
|
|
15051
|
+
|
|
15052
|
+
/**
|
|
15053
|
+
* orderFees amount.
|
|
15054
|
+
* @member {number} amount
|
|
15055
|
+
* @memberof orderFees
|
|
15056
|
+
* @instance
|
|
15057
|
+
*/
|
|
15058
|
+
orderFees.prototype.amount = 0;
|
|
15059
|
+
|
|
15060
|
+
/**
|
|
15061
|
+
* Creates a new orderFees instance using the specified properties.
|
|
15062
|
+
* @function create
|
|
15063
|
+
* @memberof orderFees
|
|
15064
|
+
* @static
|
|
15065
|
+
* @param {IorderFees=} [properties] Properties to set
|
|
15066
|
+
* @returns {orderFees} orderFees instance
|
|
15067
|
+
*/
|
|
15068
|
+
orderFees.create = function create(properties) {
|
|
15069
|
+
return new orderFees(properties);
|
|
15070
|
+
};
|
|
15071
|
+
|
|
15072
|
+
/**
|
|
15073
|
+
* Encodes the specified orderFees message. Does not implicitly {@link orderFees.verify|verify} messages.
|
|
15074
|
+
* @function encode
|
|
15075
|
+
* @memberof orderFees
|
|
15076
|
+
* @static
|
|
15077
|
+
* @param {IorderFees} message orderFees message or plain object to encode
|
|
15078
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
15079
|
+
* @returns {$protobuf.Writer} Writer
|
|
15080
|
+
*/
|
|
15081
|
+
orderFees.encode = function encode(message, writer) {
|
|
15082
|
+
if (!writer)
|
|
15083
|
+
writer = $Writer.create();
|
|
15084
|
+
if (message._id != null && Object.hasOwnProperty.call(message, "_id"))
|
|
15085
|
+
writer.uint32(/* id 0, wireType 2 =*/2).string(message._id);
|
|
15086
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
15087
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
15088
|
+
if (message.orgId != null && Object.hasOwnProperty.call(message, "orgId"))
|
|
15089
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.orgId);
|
|
15090
|
+
if (message.eventId != null && Object.hasOwnProperty.call(message, "eventId"))
|
|
15091
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.eventId);
|
|
15092
|
+
if (message.type != null && Object.hasOwnProperty.call(message, "type"))
|
|
15093
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.type);
|
|
15094
|
+
if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
|
15095
|
+
writer.uint32(/* id 5, wireType 1 =*/41).double(message.value);
|
|
15096
|
+
if (message.appliedTo != null && Object.hasOwnProperty.call(message, "appliedTo"))
|
|
15097
|
+
writer.uint32(/* id 6, wireType 2 =*/50).string(message.appliedTo);
|
|
15098
|
+
if (message.appliedBy != null && Object.hasOwnProperty.call(message, "appliedBy"))
|
|
15099
|
+
writer.uint32(/* id 7, wireType 2 =*/58).string(message.appliedBy);
|
|
15100
|
+
if (message.minAppliedToPrice != null && Object.hasOwnProperty.call(message, "minAppliedToPrice"))
|
|
15101
|
+
writer.uint32(/* id 8, wireType 0 =*/64).int32(message.minAppliedToPrice);
|
|
15102
|
+
if (message.maxAppliedToPrice != null && Object.hasOwnProperty.call(message, "maxAppliedToPrice"))
|
|
15103
|
+
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.maxAppliedToPrice);
|
|
15104
|
+
if (message.filters != null && message.filters.length)
|
|
15105
|
+
for (var i = 0; i < message.filters.length; ++i)
|
|
15106
|
+
writer.uint32(/* id 10, wireType 2 =*/82).string(message.filters[i]);
|
|
15107
|
+
if (message.createdBy != null && Object.hasOwnProperty.call(message, "createdBy"))
|
|
15108
|
+
writer.uint32(/* id 11, wireType 2 =*/90).string(message.createdBy);
|
|
15109
|
+
if (message.createdAt != null && Object.hasOwnProperty.call(message, "createdAt"))
|
|
15110
|
+
writer.uint32(/* id 12, wireType 0 =*/96).int32(message.createdAt);
|
|
15111
|
+
if (message.updatedBy != null && Object.hasOwnProperty.call(message, "updatedBy"))
|
|
15112
|
+
writer.uint32(/* id 13, wireType 2 =*/106).string(message.updatedBy);
|
|
15113
|
+
if (message.updatedAt != null && Object.hasOwnProperty.call(message, "updatedAt"))
|
|
15114
|
+
writer.uint32(/* id 14, wireType 0 =*/112).int32(message.updatedAt);
|
|
15115
|
+
if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled"))
|
|
15116
|
+
writer.uint32(/* id 15, wireType 0 =*/120).bool(message.disabled);
|
|
15117
|
+
if (message.seasonId != null && Object.hasOwnProperty.call(message, "seasonId"))
|
|
15118
|
+
writer.uint32(/* id 16, wireType 2 =*/130).string(message.seasonId);
|
|
15119
|
+
if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
|
|
15120
|
+
writer.uint32(/* id 17, wireType 0 =*/136).int32(message.amount);
|
|
15121
|
+
return writer;
|
|
15122
|
+
};
|
|
15123
|
+
|
|
15124
|
+
/**
|
|
15125
|
+
* Encodes the specified orderFees message, length delimited. Does not implicitly {@link orderFees.verify|verify} messages.
|
|
15126
|
+
* @function encodeDelimited
|
|
15127
|
+
* @memberof orderFees
|
|
15128
|
+
* @static
|
|
15129
|
+
* @param {IorderFees} message orderFees message or plain object to encode
|
|
15130
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
15131
|
+
* @returns {$protobuf.Writer} Writer
|
|
15132
|
+
*/
|
|
15133
|
+
orderFees.encodeDelimited = function encodeDelimited(message, writer) {
|
|
15134
|
+
return this.encode(message, writer).ldelim();
|
|
15135
|
+
};
|
|
15136
|
+
|
|
15137
|
+
/**
|
|
15138
|
+
* Decodes an orderFees message from the specified reader or buffer.
|
|
15139
|
+
* @function decode
|
|
15140
|
+
* @memberof orderFees
|
|
15141
|
+
* @static
|
|
15142
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
15143
|
+
* @param {number} [length] Message length if known beforehand
|
|
15144
|
+
* @returns {orderFees} orderFees
|
|
15145
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
15146
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
15147
|
+
*/
|
|
15148
|
+
orderFees.decode = function decode(reader, length) {
|
|
15149
|
+
if (!(reader instanceof $Reader))
|
|
15150
|
+
reader = $Reader.create(reader);
|
|
15151
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.orderFees();
|
|
15152
|
+
while (reader.pos < end) {
|
|
15153
|
+
var tag = reader.uint32();
|
|
15154
|
+
switch (tag >>> 3) {
|
|
15155
|
+
case 0:
|
|
15156
|
+
message._id = reader.string();
|
|
15157
|
+
break;
|
|
15158
|
+
case 1:
|
|
15159
|
+
message.name = reader.string();
|
|
15160
|
+
break;
|
|
15161
|
+
case 2:
|
|
15162
|
+
message.orgId = reader.string();
|
|
15163
|
+
break;
|
|
15164
|
+
case 3:
|
|
15165
|
+
message.eventId = reader.string();
|
|
15166
|
+
break;
|
|
15167
|
+
case 4:
|
|
15168
|
+
message.type = reader.string();
|
|
15169
|
+
break;
|
|
15170
|
+
case 5:
|
|
15171
|
+
message.value = reader.double();
|
|
15172
|
+
break;
|
|
15173
|
+
case 6:
|
|
15174
|
+
message.appliedTo = reader.string();
|
|
15175
|
+
break;
|
|
15176
|
+
case 7:
|
|
15177
|
+
message.appliedBy = reader.string();
|
|
15178
|
+
break;
|
|
15179
|
+
case 8:
|
|
15180
|
+
message.minAppliedToPrice = reader.int32();
|
|
15181
|
+
break;
|
|
15182
|
+
case 9:
|
|
15183
|
+
message.maxAppliedToPrice = reader.int32();
|
|
15184
|
+
break;
|
|
15185
|
+
case 10:
|
|
15186
|
+
if (!(message.filters && message.filters.length))
|
|
15187
|
+
message.filters = [];
|
|
15188
|
+
message.filters.push(reader.string());
|
|
15189
|
+
break;
|
|
15190
|
+
case 11:
|
|
15191
|
+
message.createdBy = reader.string();
|
|
15192
|
+
break;
|
|
15193
|
+
case 12:
|
|
15194
|
+
message.createdAt = reader.int32();
|
|
15195
|
+
break;
|
|
15196
|
+
case 13:
|
|
15197
|
+
message.updatedBy = reader.string();
|
|
15198
|
+
break;
|
|
15199
|
+
case 14:
|
|
15200
|
+
message.updatedAt = reader.int32();
|
|
15201
|
+
break;
|
|
15202
|
+
case 15:
|
|
15203
|
+
message.disabled = reader.bool();
|
|
15204
|
+
break;
|
|
15205
|
+
case 16:
|
|
15206
|
+
message.seasonId = reader.string();
|
|
15207
|
+
break;
|
|
15208
|
+
case 17:
|
|
15209
|
+
message.amount = reader.int32();
|
|
15210
|
+
break;
|
|
15211
|
+
default:
|
|
15212
|
+
reader.skipType(tag & 7);
|
|
15213
|
+
break;
|
|
15214
|
+
}
|
|
15215
|
+
}
|
|
15216
|
+
return message;
|
|
15217
|
+
};
|
|
15218
|
+
|
|
15219
|
+
/**
|
|
15220
|
+
* Decodes an orderFees message from the specified reader or buffer, length delimited.
|
|
15221
|
+
* @function decodeDelimited
|
|
15222
|
+
* @memberof orderFees
|
|
15223
|
+
* @static
|
|
15224
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
15225
|
+
* @returns {orderFees} orderFees
|
|
15226
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
15227
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
15228
|
+
*/
|
|
15229
|
+
orderFees.decodeDelimited = function decodeDelimited(reader) {
|
|
15230
|
+
if (!(reader instanceof $Reader))
|
|
15231
|
+
reader = new $Reader(reader);
|
|
15232
|
+
return this.decode(reader, reader.uint32());
|
|
15233
|
+
};
|
|
15234
|
+
|
|
15235
|
+
/**
|
|
15236
|
+
* Verifies an orderFees message.
|
|
15237
|
+
* @function verify
|
|
15238
|
+
* @memberof orderFees
|
|
15239
|
+
* @static
|
|
15240
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
15241
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
15242
|
+
*/
|
|
15243
|
+
orderFees.verify = function verify(message) {
|
|
15244
|
+
if (typeof message !== "object" || message === null)
|
|
15245
|
+
return "object expected";
|
|
15246
|
+
if (message._id != null && message.hasOwnProperty("_id"))
|
|
15247
|
+
if (!$util.isString(message._id))
|
|
15248
|
+
return "_id: string expected";
|
|
15249
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
15250
|
+
if (!$util.isString(message.name))
|
|
15251
|
+
return "name: string expected";
|
|
15252
|
+
if (message.orgId != null && message.hasOwnProperty("orgId"))
|
|
15253
|
+
if (!$util.isString(message.orgId))
|
|
15254
|
+
return "orgId: string expected";
|
|
15255
|
+
if (message.eventId != null && message.hasOwnProperty("eventId"))
|
|
15256
|
+
if (!$util.isString(message.eventId))
|
|
15257
|
+
return "eventId: string expected";
|
|
15258
|
+
if (message.type != null && message.hasOwnProperty("type"))
|
|
15259
|
+
if (!$util.isString(message.type))
|
|
15260
|
+
return "type: string expected";
|
|
15261
|
+
if (message.value != null && message.hasOwnProperty("value"))
|
|
15262
|
+
if (typeof message.value !== "number")
|
|
15263
|
+
return "value: number expected";
|
|
15264
|
+
if (message.appliedTo != null && message.hasOwnProperty("appliedTo"))
|
|
15265
|
+
if (!$util.isString(message.appliedTo))
|
|
15266
|
+
return "appliedTo: string expected";
|
|
15267
|
+
if (message.appliedBy != null && message.hasOwnProperty("appliedBy"))
|
|
15268
|
+
if (!$util.isString(message.appliedBy))
|
|
15269
|
+
return "appliedBy: string expected";
|
|
15270
|
+
if (message.minAppliedToPrice != null && message.hasOwnProperty("minAppliedToPrice"))
|
|
15271
|
+
if (!$util.isInteger(message.minAppliedToPrice))
|
|
15272
|
+
return "minAppliedToPrice: integer expected";
|
|
15273
|
+
if (message.maxAppliedToPrice != null && message.hasOwnProperty("maxAppliedToPrice"))
|
|
15274
|
+
if (!$util.isInteger(message.maxAppliedToPrice))
|
|
15275
|
+
return "maxAppliedToPrice: integer expected";
|
|
15276
|
+
if (message.filters != null && message.hasOwnProperty("filters")) {
|
|
15277
|
+
if (!Array.isArray(message.filters))
|
|
15278
|
+
return "filters: array expected";
|
|
15279
|
+
for (var i = 0; i < message.filters.length; ++i)
|
|
15280
|
+
if (!$util.isString(message.filters[i]))
|
|
15281
|
+
return "filters: string[] expected";
|
|
15282
|
+
}
|
|
15283
|
+
if (message.createdBy != null && message.hasOwnProperty("createdBy"))
|
|
15284
|
+
if (!$util.isString(message.createdBy))
|
|
15285
|
+
return "createdBy: string expected";
|
|
15286
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
15287
|
+
if (!$util.isInteger(message.createdAt))
|
|
15288
|
+
return "createdAt: integer expected";
|
|
15289
|
+
if (message.updatedBy != null && message.hasOwnProperty("updatedBy"))
|
|
15290
|
+
if (!$util.isString(message.updatedBy))
|
|
15291
|
+
return "updatedBy: string expected";
|
|
15292
|
+
if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
|
|
15293
|
+
if (!$util.isInteger(message.updatedAt))
|
|
15294
|
+
return "updatedAt: integer expected";
|
|
15295
|
+
if (message.disabled != null && message.hasOwnProperty("disabled"))
|
|
15296
|
+
if (typeof message.disabled !== "boolean")
|
|
15297
|
+
return "disabled: boolean expected";
|
|
15298
|
+
if (message.seasonId != null && message.hasOwnProperty("seasonId"))
|
|
15299
|
+
if (!$util.isString(message.seasonId))
|
|
15300
|
+
return "seasonId: string expected";
|
|
15301
|
+
if (message.amount != null && message.hasOwnProperty("amount"))
|
|
15302
|
+
if (!$util.isInteger(message.amount))
|
|
15303
|
+
return "amount: integer expected";
|
|
15304
|
+
return null;
|
|
15305
|
+
};
|
|
15306
|
+
|
|
15307
|
+
/**
|
|
15308
|
+
* Creates an orderFees message from a plain object. Also converts values to their respective internal types.
|
|
15309
|
+
* @function fromObject
|
|
15310
|
+
* @memberof orderFees
|
|
15311
|
+
* @static
|
|
15312
|
+
* @param {Object.<string,*>} object Plain object
|
|
15313
|
+
* @returns {orderFees} orderFees
|
|
15314
|
+
*/
|
|
15315
|
+
orderFees.fromObject = function fromObject(object) {
|
|
15316
|
+
if (object instanceof $root.orderFees)
|
|
15317
|
+
return object;
|
|
15318
|
+
var message = new $root.orderFees();
|
|
15319
|
+
if (object._id != null)
|
|
15320
|
+
message._id = String(object._id);
|
|
15321
|
+
if (object.name != null)
|
|
15322
|
+
message.name = String(object.name);
|
|
15323
|
+
if (object.orgId != null)
|
|
15324
|
+
message.orgId = String(object.orgId);
|
|
15325
|
+
if (object.eventId != null)
|
|
15326
|
+
message.eventId = String(object.eventId);
|
|
15327
|
+
if (object.type != null)
|
|
15328
|
+
message.type = String(object.type);
|
|
15329
|
+
if (object.value != null)
|
|
15330
|
+
message.value = Number(object.value);
|
|
15331
|
+
if (object.appliedTo != null)
|
|
15332
|
+
message.appliedTo = String(object.appliedTo);
|
|
15333
|
+
if (object.appliedBy != null)
|
|
15334
|
+
message.appliedBy = String(object.appliedBy);
|
|
15335
|
+
if (object.minAppliedToPrice != null)
|
|
15336
|
+
message.minAppliedToPrice = object.minAppliedToPrice | 0;
|
|
15337
|
+
if (object.maxAppliedToPrice != null)
|
|
15338
|
+
message.maxAppliedToPrice = object.maxAppliedToPrice | 0;
|
|
15339
|
+
if (object.filters) {
|
|
15340
|
+
if (!Array.isArray(object.filters))
|
|
15341
|
+
throw TypeError(".orderFees.filters: array expected");
|
|
15342
|
+
message.filters = [];
|
|
15343
|
+
for (var i = 0; i < object.filters.length; ++i)
|
|
15344
|
+
message.filters[i] = String(object.filters[i]);
|
|
15345
|
+
}
|
|
15346
|
+
if (object.createdBy != null)
|
|
15347
|
+
message.createdBy = String(object.createdBy);
|
|
15348
|
+
if (object.createdAt != null)
|
|
15349
|
+
message.createdAt = object.createdAt | 0;
|
|
15350
|
+
if (object.updatedBy != null)
|
|
15351
|
+
message.updatedBy = String(object.updatedBy);
|
|
15352
|
+
if (object.updatedAt != null)
|
|
15353
|
+
message.updatedAt = object.updatedAt | 0;
|
|
15354
|
+
if (object.disabled != null)
|
|
15355
|
+
message.disabled = Boolean(object.disabled);
|
|
15356
|
+
if (object.seasonId != null)
|
|
15357
|
+
message.seasonId = String(object.seasonId);
|
|
15358
|
+
if (object.amount != null)
|
|
15359
|
+
message.amount = object.amount | 0;
|
|
15360
|
+
return message;
|
|
15361
|
+
};
|
|
15362
|
+
|
|
15363
|
+
/**
|
|
15364
|
+
* Creates a plain object from an orderFees message. Also converts values to other types if specified.
|
|
15365
|
+
* @function toObject
|
|
15366
|
+
* @memberof orderFees
|
|
15367
|
+
* @static
|
|
15368
|
+
* @param {orderFees} message orderFees
|
|
15369
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
15370
|
+
* @returns {Object.<string,*>} Plain object
|
|
15371
|
+
*/
|
|
15372
|
+
orderFees.toObject = function toObject(message, options) {
|
|
15373
|
+
if (!options)
|
|
15374
|
+
options = {};
|
|
15375
|
+
var object = {};
|
|
15376
|
+
if (options.arrays || options.defaults)
|
|
15377
|
+
object.filters = [];
|
|
15378
|
+
if (options.defaults) {
|
|
15379
|
+
object._id = "";
|
|
15380
|
+
object.name = "";
|
|
15381
|
+
object.orgId = "";
|
|
15382
|
+
object.eventId = "";
|
|
15383
|
+
object.type = "";
|
|
15384
|
+
object.value = 0;
|
|
15385
|
+
object.appliedTo = "";
|
|
15386
|
+
object.appliedBy = "";
|
|
15387
|
+
object.minAppliedToPrice = 0;
|
|
15388
|
+
object.maxAppliedToPrice = 0;
|
|
15389
|
+
object.createdBy = "";
|
|
15390
|
+
object.createdAt = 0;
|
|
15391
|
+
object.updatedBy = "";
|
|
15392
|
+
object.updatedAt = 0;
|
|
15393
|
+
object.disabled = false;
|
|
15394
|
+
object.seasonId = "";
|
|
15395
|
+
object.amount = 0;
|
|
15396
|
+
}
|
|
15397
|
+
if (message._id != null && message.hasOwnProperty("_id"))
|
|
15398
|
+
object._id = message._id;
|
|
15399
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
15400
|
+
object.name = message.name;
|
|
15401
|
+
if (message.orgId != null && message.hasOwnProperty("orgId"))
|
|
15402
|
+
object.orgId = message.orgId;
|
|
15403
|
+
if (message.eventId != null && message.hasOwnProperty("eventId"))
|
|
15404
|
+
object.eventId = message.eventId;
|
|
15405
|
+
if (message.type != null && message.hasOwnProperty("type"))
|
|
15406
|
+
object.type = message.type;
|
|
15407
|
+
if (message.value != null && message.hasOwnProperty("value"))
|
|
15408
|
+
object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value;
|
|
15409
|
+
if (message.appliedTo != null && message.hasOwnProperty("appliedTo"))
|
|
15410
|
+
object.appliedTo = message.appliedTo;
|
|
15411
|
+
if (message.appliedBy != null && message.hasOwnProperty("appliedBy"))
|
|
15412
|
+
object.appliedBy = message.appliedBy;
|
|
15413
|
+
if (message.minAppliedToPrice != null && message.hasOwnProperty("minAppliedToPrice"))
|
|
15414
|
+
object.minAppliedToPrice = message.minAppliedToPrice;
|
|
15415
|
+
if (message.maxAppliedToPrice != null && message.hasOwnProperty("maxAppliedToPrice"))
|
|
15416
|
+
object.maxAppliedToPrice = message.maxAppliedToPrice;
|
|
15417
|
+
if (message.filters && message.filters.length) {
|
|
15418
|
+
object.filters = [];
|
|
15419
|
+
for (var j = 0; j < message.filters.length; ++j)
|
|
15420
|
+
object.filters[j] = message.filters[j];
|
|
15421
|
+
}
|
|
15422
|
+
if (message.createdBy != null && message.hasOwnProperty("createdBy"))
|
|
15423
|
+
object.createdBy = message.createdBy;
|
|
15424
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
15425
|
+
object.createdAt = message.createdAt;
|
|
15426
|
+
if (message.updatedBy != null && message.hasOwnProperty("updatedBy"))
|
|
15427
|
+
object.updatedBy = message.updatedBy;
|
|
15428
|
+
if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
|
|
15429
|
+
object.updatedAt = message.updatedAt;
|
|
15430
|
+
if (message.disabled != null && message.hasOwnProperty("disabled"))
|
|
15431
|
+
object.disabled = message.disabled;
|
|
15432
|
+
if (message.seasonId != null && message.hasOwnProperty("seasonId"))
|
|
15433
|
+
object.seasonId = message.seasonId;
|
|
15434
|
+
if (message.amount != null && message.hasOwnProperty("amount"))
|
|
15435
|
+
object.amount = message.amount;
|
|
15436
|
+
return object;
|
|
15437
|
+
};
|
|
15438
|
+
|
|
15439
|
+
/**
|
|
15440
|
+
* Converts this orderFees to JSON.
|
|
15441
|
+
* @function toJSON
|
|
15442
|
+
* @memberof orderFees
|
|
15443
|
+
* @instance
|
|
15444
|
+
* @returns {Object.<string,*>} JSON object
|
|
15445
|
+
*/
|
|
15446
|
+
orderFees.prototype.toJSON = function toJSON() {
|
|
15447
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
15448
|
+
};
|
|
15449
|
+
|
|
15450
|
+
return orderFees;
|
|
15451
|
+
})();
|
|
15452
|
+
|
|
14831
15453
|
$root.TeiMemberInfoParams = (function() {
|
|
14832
15454
|
|
|
14833
15455
|
/**
|
|
@@ -34563,7 +35185,7 @@ $root.OrderService = (function() {
|
|
|
34563
35185
|
* @typedef sendSeasonOrderReceiptEmailCallback
|
|
34564
35186
|
* @type {function}
|
|
34565
35187
|
* @param {Error|null} error Error, if any
|
|
34566
|
-
* @param {
|
|
35188
|
+
* @param {SendOrderReceiptEmailResponse} [response] SendOrderReceiptEmailResponse
|
|
34567
35189
|
*/
|
|
34568
35190
|
|
|
34569
35191
|
/**
|
|
@@ -34571,13 +35193,13 @@ $root.OrderService = (function() {
|
|
|
34571
35193
|
* @function sendSeasonOrderReceiptEmail
|
|
34572
35194
|
* @memberof OrderService
|
|
34573
35195
|
* @instance
|
|
34574
|
-
* @param {
|
|
34575
|
-
* @param {OrderService.sendSeasonOrderReceiptEmailCallback} callback Node-style callback called with the error, if any, and
|
|
35196
|
+
* @param {ISendOrderReceiptEmailRequest} request SendOrderReceiptEmailRequest message or plain object
|
|
35197
|
+
* @param {OrderService.sendSeasonOrderReceiptEmailCallback} callback Node-style callback called with the error, if any, and SendOrderReceiptEmailResponse
|
|
34576
35198
|
* @returns {undefined}
|
|
34577
35199
|
* @variation 1
|
|
34578
35200
|
*/
|
|
34579
35201
|
Object.defineProperty(OrderService.prototype.sendSeasonOrderReceiptEmail = function sendSeasonOrderReceiptEmail(request, callback) {
|
|
34580
|
-
return this.rpcCall(sendSeasonOrderReceiptEmail, $root.
|
|
35202
|
+
return this.rpcCall(sendSeasonOrderReceiptEmail, $root.SendOrderReceiptEmailRequest, $root.SendOrderReceiptEmailResponse, request, callback);
|
|
34581
35203
|
}, "name", { value: "sendSeasonOrderReceiptEmail" });
|
|
34582
35204
|
|
|
34583
35205
|
/**
|
|
@@ -34585,8 +35207,8 @@ $root.OrderService = (function() {
|
|
|
34585
35207
|
* @function sendSeasonOrderReceiptEmail
|
|
34586
35208
|
* @memberof OrderService
|
|
34587
35209
|
* @instance
|
|
34588
|
-
* @param {
|
|
34589
|
-
* @returns {Promise<
|
|
35210
|
+
* @param {ISendOrderReceiptEmailRequest} request SendOrderReceiptEmailRequest message or plain object
|
|
35211
|
+
* @returns {Promise<SendOrderReceiptEmailResponse>} Promise
|
|
34590
35212
|
* @variation 2
|
|
34591
35213
|
*/
|
|
34592
35214
|
|