@questwork/q-store-model 0.1.40 → 0.1.41

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.
@@ -4099,7 +4099,12 @@ function paymentCharge_setId(id) {
4099
4099
 
4100
4100
  const receiptLine_updateAllowedProps = [
4101
4101
  'additionalData',
4102
+ 'amount',
4103
+ 'paidAmount',
4104
+ 'paymentGatewayCode',
4105
+ 'receiptDate',
4102
4106
  'status',
4107
+ 'surcharge'
4103
4108
  ]
4104
4109
 
4105
4110
  class ReceiptLine extends q_utilities_namespaceObject.TenantAwareEntity {
@@ -4208,6 +4213,8 @@ class ReceiptLine extends q_utilities_namespaceObject.TenantAwareEntity {
4208
4213
  this[key] = q_utilities_namespaceObject.KeyValueObject.initOnlyValidFromArray(obj[key])
4209
4214
  } else if (key === 'status') {
4210
4215
  this[key] = this[key] instanceof this._Status ? this[key].update(obj[key]) : this._Status.init(obj[key])
4216
+ } else if (key === 'amount' || key === 'paidAmount' || key === 'surcharge') {
4217
+ this[key] = this[key] instanceof this._Amount ? this[key].update(obj[key]) : this._Amount.init(obj[key])
4211
4218
  } else {
4212
4219
  this[key] = obj[key]
4213
4220
  }
@@ -4238,7 +4245,12 @@ function receiptLine_setId(id) {
4238
4245
 
4239
4246
 
4240
4247
  const receipt_updateAllowedProps = [
4248
+ 'amount',
4249
+ 'paidAmount',
4250
+ 'receiptDate',
4251
+ 'revisionNumber',
4241
4252
  'status',
4253
+ 'surcharge'
4242
4254
  ]
4243
4255
 
4244
4256
  class Receipt extends q_utilities_namespaceObject.TenantAwareEntity {
@@ -4258,7 +4270,6 @@ class Receipt extends q_utilities_namespaceObject.TenantAwareEntity {
4258
4270
  this._type = options._type || 'Receipt'
4259
4271
  this.amount = this._Amount.init(options.amount)
4260
4272
  this.paidAmount = this._Amount.init(options.paidAmount)
4261
- this.paymentGatewayCode = options.paymentGatewayCode
4262
4273
  this.receiptCode = options.receiptCode
4263
4274
  this.receiptDate = options.receiptDate || (new Date()).valueOf()
4264
4275
  this.receiptNumber = options.receiptNumber
@@ -4343,6 +4354,8 @@ class Receipt extends q_utilities_namespaceObject.TenantAwareEntity {
4343
4354
  if (receipt_updateAllowedProps.includes(key)) {
4344
4355
  if (key === 'status') {
4345
4356
  this[key] = this.status instanceof this._Status ? this.status.update(obj[key]) : this._Status.init(obj[key])
4357
+ } else if (key === 'amount' || key === 'paidAmount' || key === 'surcharge') {
4358
+ this[key] = this[key] instanceof this._Amount ? this[key].update(obj[key]) : this._Amount.init(obj[key])
4346
4359
  } else {
4347
4360
  this[key] = obj[key]
4348
4361
  }
package/dist/index.min.js CHANGED
@@ -4095,7 +4095,12 @@ function paymentCharge_setId(id) {
4095
4095
 
4096
4096
  const receiptLine_updateAllowedProps = [
4097
4097
  'additionalData',
4098
+ 'amount',
4099
+ 'paidAmount',
4100
+ 'paymentGatewayCode',
4101
+ 'receiptDate',
4098
4102
  'status',
4103
+ 'surcharge'
4099
4104
  ]
4100
4105
 
4101
4106
  class ReceiptLine extends q_utilities_namespaceObject.TenantAwareEntity {
@@ -4204,6 +4209,8 @@ class ReceiptLine extends q_utilities_namespaceObject.TenantAwareEntity {
4204
4209
  this[key] = q_utilities_namespaceObject.KeyValueObject.initOnlyValidFromArray(obj[key])
4205
4210
  } else if (key === 'status') {
4206
4211
  this[key] = this[key] instanceof this._Status ? this[key].update(obj[key]) : this._Status.init(obj[key])
4212
+ } else if (key === 'amount' || key === 'paidAmount' || key === 'surcharge') {
4213
+ this[key] = this[key] instanceof this._Amount ? this[key].update(obj[key]) : this._Amount.init(obj[key])
4207
4214
  } else {
4208
4215
  this[key] = obj[key]
4209
4216
  }
@@ -4234,7 +4241,12 @@ function receiptLine_setId(id) {
4234
4241
 
4235
4242
 
4236
4243
  const receipt_updateAllowedProps = [
4244
+ 'amount',
4245
+ 'paidAmount',
4246
+ 'receiptDate',
4247
+ 'revisionNumber',
4237
4248
  'status',
4249
+ 'surcharge'
4238
4250
  ]
4239
4251
 
4240
4252
  class Receipt extends q_utilities_namespaceObject.TenantAwareEntity {
@@ -4254,7 +4266,6 @@ class Receipt extends q_utilities_namespaceObject.TenantAwareEntity {
4254
4266
  this._type = options._type || 'Receipt'
4255
4267
  this.amount = this._Amount.init(options.amount)
4256
4268
  this.paidAmount = this._Amount.init(options.paidAmount)
4257
- this.paymentGatewayCode = options.paymentGatewayCode
4258
4269
  this.receiptCode = options.receiptCode
4259
4270
  this.receiptDate = options.receiptDate || (new Date()).valueOf()
4260
4271
  this.receiptNumber = options.receiptNumber
@@ -4339,6 +4350,8 @@ class Receipt extends q_utilities_namespaceObject.TenantAwareEntity {
4339
4350
  if (receipt_updateAllowedProps.includes(key)) {
4340
4351
  if (key === 'status') {
4341
4352
  this[key] = this.status instanceof this._Status ? this.status.update(obj[key]) : this._Status.init(obj[key])
4353
+ } else if (key === 'amount' || key === 'paidAmount' || key === 'surcharge') {
4354
+ this[key] = this[key] instanceof this._Amount ? this[key].update(obj[key]) : this._Amount.init(obj[key])
4342
4355
  } else {
4343
4356
  this[key] = obj[key]
4344
4357
  }
@@ -4137,7 +4137,12 @@ function paymentCharge_setId(id) {
4137
4137
 
4138
4138
  const receiptLine_updateAllowedProps = [
4139
4139
  'additionalData',
4140
+ 'amount',
4141
+ 'paidAmount',
4142
+ 'paymentGatewayCode',
4143
+ 'receiptDate',
4140
4144
  'status',
4145
+ 'surcharge'
4141
4146
  ]
4142
4147
 
4143
4148
  class ReceiptLine extends q_utilities_.TenantAwareEntity {
@@ -4246,6 +4251,8 @@ class ReceiptLine extends q_utilities_.TenantAwareEntity {
4246
4251
  this[key] = q_utilities_.KeyValueObject.initOnlyValidFromArray(obj[key])
4247
4252
  } else if (key === 'status') {
4248
4253
  this[key] = this[key] instanceof this._Status ? this[key].update(obj[key]) : this._Status.init(obj[key])
4254
+ } else if (key === 'amount' || key === 'paidAmount' || key === 'surcharge') {
4255
+ this[key] = this[key] instanceof this._Amount ? this[key].update(obj[key]) : this._Amount.init(obj[key])
4249
4256
  } else {
4250
4257
  this[key] = obj[key]
4251
4258
  }
@@ -4276,7 +4283,12 @@ function receiptLine_setId(id) {
4276
4283
 
4277
4284
 
4278
4285
  const receipt_updateAllowedProps = [
4286
+ 'amount',
4287
+ 'paidAmount',
4288
+ 'receiptDate',
4289
+ 'revisionNumber',
4279
4290
  'status',
4291
+ 'surcharge'
4280
4292
  ]
4281
4293
 
4282
4294
  class Receipt extends q_utilities_.TenantAwareEntity {
@@ -4296,7 +4308,6 @@ class Receipt extends q_utilities_.TenantAwareEntity {
4296
4308
  this._type = options._type || 'Receipt'
4297
4309
  this.amount = this._Amount.init(options.amount)
4298
4310
  this.paidAmount = this._Amount.init(options.paidAmount)
4299
- this.paymentGatewayCode = options.paymentGatewayCode
4300
4311
  this.receiptCode = options.receiptCode
4301
4312
  this.receiptDate = options.receiptDate || (new Date()).valueOf()
4302
4313
  this.receiptNumber = options.receiptNumber
@@ -4381,6 +4392,8 @@ class Receipt extends q_utilities_.TenantAwareEntity {
4381
4392
  if (receipt_updateAllowedProps.includes(key)) {
4382
4393
  if (key === 'status') {
4383
4394
  this[key] = this.status instanceof this._Status ? this.status.update(obj[key]) : this._Status.init(obj[key])
4395
+ } else if (key === 'amount' || key === 'paidAmount' || key === 'surcharge') {
4396
+ this[key] = this[key] instanceof this._Amount ? this[key].update(obj[key]) : this._Amount.init(obj[key])
4384
4397
  } else {
4385
4398
  this[key] = obj[key]
4386
4399
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@questwork/q-store-model",
3
- "version": "0.1.40",
3
+ "version": "0.1.41",
4
4
  "description": "Questwork QStore Model",
5
5
  "main": "dist/index.min.js",
6
6
  "type": "module",