Sha256: e58250563052a5477d645ab5d06adea9cb0132df948b64bb02d9440da92f80d9
Contents?: true
Size: 757 Bytes
Versions: 5
Compression:
Stored size: 757 Bytes
Contents
module Workarea module MailChimp class Store include ApplicationDocument field :mail_chimp_id, type: String field :list_id, type: String field :name, type: String field :currency_code, type: String field :connected_site, type: Hash index mail_chimp_id: 1 def self.with_syncing_enabled(&block) MailChimp.request.ecommerce.stores(Workarea::MailChimp.config.default_store[:id]).update(body: { is_syncing: true }) block.call ensure MailChimp.request.ecommerce.stores(Workarea::MailChimp.config.default_store[:id]).update(body: { is_syncing: false }) end def site_script_fragment connected_site.dig("site_script", "fragment") end end end end
Version data entries
5 entries across 5 versions & 1 rubygems