Shop.fromJson constructor
Implementation
factory Shop.fromJson(Map<String, dynamic> json) => Shop(
id: json["id"],
name: json["name"],
email: json["email"],
domain: json["domain"],
province: json["province"],
country: json["country"],
address1: json["address1"],
zip: json["zip"],
city: json["city"],
source: json["source"],
phone: json["phone"],
latitude: json["latitude"]?.toDouble(),
longitude: json["longitude"]?.toDouble(),
primaryLocale: json["primary_locale"],
address2: json["address2"],
createdAt: json["created_at"] == null
? null
: DateTime.parse(json["created_at"]),
updatedAt: json["updated_at"] == null
? null
: DateTime.parse(json["updated_at"]),
countryCode: json["country_code"],
countryName: json["country_name"],
currency: json["currency"],
customerEmail: json["customer_email"],
timezone: json["timezone"],
ianaTimezone: json["iana_timezone"],
shopOwner: json["shop_owner"],
moneyFormat: json["money_format"],
moneyWithCurrencyFormat: json["money_with_currency_format"],
weightUnit: json["weight_unit"],
provinceCode: json["province_code"],
taxesIncluded: json["taxes_included"],
autoConfigureTaxInclusivity: json["auto_configure_tax_inclusivity"],
taxShipping: json["tax_shipping"],
countyTaxes: json["county_taxes"],
planDisplayName: json["plan_display_name"],
planName: json["plan_name"],
hasDiscounts: json["has_discounts"],
hasGiftCards: json["has_gift_cards"],
myshopifyDomain: json["myshopify_domain"],
googleAppsDomain: json["google_apps_domain"],
googleAppsLoginEnabled: json["google_apps_login_enabled"],
moneyInEmailsFormat: json["money_in_emails_format"],
moneyWithCurrencyInEmailsFormat:
json["money_with_currency_in_emails_format"],
eligibleForPayments: json["eligible_for_payments"],
requiresExtraPaymentsAgreement:
json["requires_extra_payments_agreement"],
passwordEnabled: json["password_enabled"],
hasStorefront: json["has_storefront"],
finances: json["finances"],
primaryLocationId: json["primary_location_id"],
cookieConsentLevel: json["cookie_consent_level"],
checkoutApiSupported: json["checkout_api_supported"],
multiLocationEnabled: json["multi_location_enabled"],
setupRequired: json["setup_required"],
preLaunchEnabled: json["pre_launch_enabled"],
enabledPresentmentCurrencies:
json["enabled_presentment_currencies"] == null
? []
: List<String>.from(
json["enabled_presentment_currencies"]!.map((x) => x)),
transactionalSmsDisabled: json["transactional_sms_disabled"],
marketingSmsConsentEnabledAtCheckout:
json["marketing_sms_consent_enabled_at_checkout"],
);