Sha256: 2fa02aca2f7926bf8942365d37697ccee3c3f82c0a83f204acba29c873c39016
Contents?: true
Size: 804 Bytes
Versions: 9
Compression:
Stored size: 804 Bytes
Contents
# frozen_string_literal: true module ShopifyAPI class Customer < Base include Metafields def orders Order.find(:all, params: { customer_id: self.id }) end def self.search(params) find(:all, from: :search, params: params) end def account_activation_url resource = post(:account_activation_url, {}, only_id) data = ActiveSupport::JSON.decode(resource.body.to_s) result = nil if data.key?('account_activation_url') result = data['account_activation_url'] end result end def send_invite(customer_invite = ShopifyAPI::CustomerInvite.new) resource = post(:send_invite, {}, customer_invite.encode) ShopifyAPI::CustomerInvite.new(ShopifyAPI::CustomerInvite.format.decode(resource.body)) end end end
Version data entries
9 entries across 9 versions & 2 rubygems