Skip to content

Commit e34eeee

Browse files
Rename Coupon to DiscountCoupon. Deprecate LoyaltyPoints for RewardPoints.
1 parent 14dcf85 commit e34eeee

22 files changed

+1429
-404
lines changed

dist/golang/actions/amendments_test.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,7 @@ func TestInstrumentCreateAmendments(t *testing.T) {
13101310
}
13111311

13121312
func TestInstrumentCreateAmendmentsCouponName(t *testing.T) {
1313-
currentCoupon := &instruments.Coupon{
1313+
currentCoupon := &instruments.DiscountCoupon{
13141314
FaceValue: &instruments.CurrencyValueField{
13151315
Value: 100,
13161316
CurrencyCode: "USD",
@@ -1324,11 +1324,11 @@ func TestInstrumentCreateAmendmentsCouponName(t *testing.T) {
13241324
current := &InstrumentCreation{
13251325
TradeRestrictions: []string{"AUS"},
13261326
AuthorizedTokenQty: 10000,
1327-
InstrumentType: instruments.CodeCoupon,
1327+
InstrumentType: instruments.CodeDiscountCoupon,
13281328
InstrumentPayload: cb,
13291329
}
13301330

1331-
newCoupon := &instruments.Coupon{
1331+
newCoupon := &instruments.DiscountCoupon{
13321332
FaceValue: &instruments.CurrencyValueField{
13331333
Value: 100,
13341334
CurrencyCode: "USD",
@@ -1342,7 +1342,7 @@ func TestInstrumentCreateAmendmentsCouponName(t *testing.T) {
13421342
newValue := &InstrumentDefinition{
13431343
TradeRestrictions: []string{"AUS"},
13441344
AuthorizedTokenQty: 10000,
1345-
InstrumentType: instruments.CodeCoupon,
1345+
InstrumentType: instruments.CodeDiscountCoupon,
13461346
InstrumentPayload: nb,
13471347
}
13481348

@@ -1357,9 +1357,10 @@ func TestInstrumentCreateAmendmentsCouponName(t *testing.T) {
13571357

13581358
// Check amendment
13591359
expectedAmendment := &AmendmentField{
1360-
FieldIndexPath: []byte{2, byte(InstrumentFieldInstrumentPayload), byte(instruments.CouponFieldCouponName)},
1361-
Operation: 0,
1362-
Data: []byte("New Test Coupon"),
1360+
FieldIndexPath: []byte{2, byte(InstrumentFieldInstrumentPayload),
1361+
byte(instruments.DiscountCouponFieldCouponName)},
1362+
Operation: 0,
1363+
Data: []byte("New Test Coupon"),
13631364
}
13641365

13651366
if !amendments[0].Equal(expectedAmendment) {

0 commit comments

Comments
 (0)