diff --git a/shop.go b/shop.go index 64237d96..1cbc9257 100644 --- a/shop.go +++ b/shop.go @@ -17,47 +17,54 @@ type ShopServiceOp struct { // Shop represents a Shopify shop type Shop struct { - ID int `json:"id"` - Name string `json:"name"` - ShopOwner string `json:"shop_owner"` - Email string `json:"email"` - CustomerEmail string `json:"customer_email"` - CreatedAt *time.Time `json:"created_at"` - UpdatedAt *time.Time `json:"updated_at"` - Address1 string `json:"address1"` - Address2 string `json:"address2"` - City string `json:"city"` - Country string `json:"country"` - CountryCode string `json:"country_code"` - CountryName string `json:"country_name"` - Currency string `json:"currency"` - Domain string `json:"domain"` - Latitude float64 `json:"latitude"` - Longitude float64 `json:"longitude"` - Phone string `json:"phone"` - Province string `json:"province"` - ProvinceCode string `json:"province_code"` - Zip string `json:"zip"` - MoneyFormat string `json:"money_format"` - MoneyWithCurrencyFormat string `json:"money_with_currency_format"` - WeightUnit string `json:"weight_unit"` - MyshopifyDomain string `json:"myshopify_domain"` - PlanName string `json:"plan_name"` - PlanDisplayName string `json:"plan_display_name"` - PasswordEnabled bool `json:"password_enabled"` - PrimaryLocale string `json:"primary_locale"` - PrimaryLocationId int `json:"primary_location_id"` - Timezone string `json:"timezone"` - IanaTimezone string `json:"iana_timezone"` - ForceSSL bool `json:"force_ssl"` - TaxShipping bool `json:"tax_shipping"` - TaxesIncluded bool `json:"taxes_included"` - HasStorefront bool `json:"has_storefront"` - HasDiscounts bool `json:"has_discounts"` - HasGiftcards bool `json:"has_gift_cards"` - SetupRequire bool `json:"setup_required"` - CountyTaxes bool `json:"county_taxes"` - CheckoutAPISupported bool `json:"checkout_api_supported"` + ID int `json:"id"` + Name string `json:"name"` + ShopOwner string `json:"shop_owner"` + Email string `json:"email"` + CustomerEmail string `json:"customer_email"` + CreatedAt *time.Time `json:"created_at"` + UpdatedAt *time.Time `json:"updated_at"` + Address1 string `json:"address1"` + Address2 string `json:"address2"` + City string `json:"city"` + Country string `json:"country"` + CountryCode string `json:"country_code"` + CountryName string `json:"country_name"` + Currency string `json:"currency"` + Domain string `json:"domain"` + Latitude float64 `json:"latitude"` + Longitude float64 `json:"longitude"` + Phone string `json:"phone"` + Province string `json:"province"` + ProvinceCode string `json:"province_code"` + Zip string `json:"zip"` + MoneyFormat string `json:"money_format"` + MoneyWithCurrencyFormat string `json:"money_with_currency_format"` + WeightUnit string `json:"weight_unit"` + MyshopifyDomain string `json:"myshopify_domain"` + PlanName string `json:"plan_name"` + PlanDisplayName string `json:"plan_display_name"` + PasswordEnabled bool `json:"password_enabled"` + PrimaryLocale string `json:"primary_locale"` + PrimaryLocationId int `json:"primary_location_id"` + Timezone string `json:"timezone"` + IanaTimezone string `json:"iana_timezone"` + ForceSSL bool `json:"force_ssl"` + TaxShipping bool `json:"tax_shipping"` + TaxesIncluded bool `json:"taxes_included"` + HasStorefront bool `json:"has_storefront"` + HasDiscounts bool `json:"has_discounts"` + HasGiftcards bool `json:"has_gift_cards"` + SetupRequire bool `json:"setup_required"` + CountyTaxes bool `json:"county_taxes"` + CheckoutAPISupported bool `json:"checkout_api_supported"` + Source string `json:"source"` + GoogleAppsDomain string `json:"google_apps_domain"` + GoogleAppsLoginEnabled bool `json:"google_apps_login_enabled"` + MoneyInEmailsFormat string `json:"money_in_emails_format"` + MoneyWithCurrencyInEmailsFormat string `json:"money_with_currency_in_emails_format"` + EligibleForPayments bool `json:"eligible_for_payments"` + RequiresExtraPaymentsAgreement bool `json:"requires_extra_payments_agreement"` } // Represents the result from the admin/shop.json endpoint diff --git a/shop_test.go b/shop_test.go index cf844eee..66483a5a 100644 --- a/shop_test.go +++ b/shop_test.go @@ -37,6 +37,13 @@ func TestShopGet(t *testing.T) { {"Name", "Apple Computers", shop.Name}, {"Email", "steve@apple.com", shop.Email}, {"HasStorefront", true, shop.HasStorefront}, + {"Source", "", shop.Source}, + {"GoogleAppsDomain", "", shop.GoogleAppsDomain}, + {"GoogleAppsLoginEnabled", false, shop.GoogleAppsLoginEnabled}, + {"MoneyInEmailsFormat", "${{amount}}", shop.MoneyInEmailsFormat}, + {"MoneyWithCurrencyInEmailsFormat", "${{amount}} USD", shop.MoneyWithCurrencyInEmailsFormat}, + {"EligibleForPayments", true, shop.EligibleForPayments}, + {"RequiresExtraPaymentsAgreement", false, shop.RequiresExtraPaymentsAgreement}, } for _, c := range cases {