Sha256: f6458f2adfdf895559798fa7900555f53d66a7b5cd620d86aa42d3eacd55df68
Contents?: true
Size: 772 Bytes
Versions: 33
Compression:
Stored size: 772 Bytes
Contents
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
33 entries across 33 versions & 1 rubygems