Skip to content

Commit

Permalink
Adding pre_launch_enabled to shop model (#63)
Browse files Browse the repository at this point in the history
- updates fixture, model and tests
- adds support for pre_launch_enabled flag on shop model
  • Loading branch information
fidel-ruiz authored and gordcurrie committed Sep 6, 2019
1 parent 20ffb76 commit 2b90b05
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fixtures/shop.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"country_name": "United States",
"currency": "USD",
"timezone": "(GMT-05:00) Eastern Time (US & Canada)",
"iana_timezone": "America\/New_York",
"iana_timezone": "America/New_York",
"shop_owner": "Steve Jobs",
"money_format": "${{amount}}",
"money_with_currency_format": "${{amount}} USD",
Expand All @@ -45,6 +45,7 @@
"has_storefront": true,
"eligible_for_card_reader_giveaway": false,
"setup_required": false,
"force_ssl": false
"force_ssl": false,
"pre_launch_enabled": false
}
}
1 change: 1 addition & 0 deletions shop.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ type Shop struct {
MoneyWithCurrencyInEmailsFormat string `json:"money_with_currency_in_emails_format"`
EligibleForPayments bool `json:"eligible_for_payments"`
RequiresExtraPaymentsAgreement bool `json:"requires_extra_payments_agreement"`
PreLaunchEnabled bool `json:"pre_launch_enabled"`
}

// Represents the result from the admin/shop.json endpoint
Expand Down
1 change: 1 addition & 0 deletions shop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func TestShopGet(t *testing.T) {
{"MoneyWithCurrencyInEmailsFormat", "${{amount}} USD", shop.MoneyWithCurrencyInEmailsFormat},
{"EligibleForPayments", true, shop.EligibleForPayments},
{"RequiresExtraPaymentsAgreement", false, shop.RequiresExtraPaymentsAgreement},
{"PreLaunchEnabled", false, shop.PreLaunchEnabled},
}

for _, c := range cases {
Expand Down

0 comments on commit 2b90b05

Please sign in to comment.