From 2b90b050bd4d7527409229f4c3877229639194d5 Mon Sep 17 00:00:00 2001 From: Fidel Ruiz Date: Fri, 6 Sep 2019 11:58:03 -0500 Subject: [PATCH] Adding pre_launch_enabled to shop model (#63) - updates fixture, model and tests - adds support for pre_launch_enabled flag on shop model --- fixtures/shop.json | 5 +++-- shop.go | 1 + shop_test.go | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fixtures/shop.json b/fixtures/shop.json index 7ddb374c..2f33ad69 100644 --- a/fixtures/shop.json +++ b/fixtures/shop.json @@ -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", @@ -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 } } diff --git a/shop.go b/shop.go index d6a51f6f..9ebd6d36 100644 --- a/shop.go +++ b/shop.go @@ -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 diff --git a/shop_test.go b/shop_test.go index e29e33dc..4c85df0d 100644 --- a/shop_test.go +++ b/shop_test.go @@ -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 {