class ShopifyAPI::Customer
Public Class Methods
search(params)
click to toggle source
# File lib/shopify_api/resources/customer.rb, line 10 def self.search(params) find(:all, from: :search, params: params) end
Public Instance Methods
account_activation_url()
click to toggle source
# File lib/shopify_api/resources/customer.rb, line 14 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
orders()
click to toggle source
# File lib/shopify_api/resources/customer.rb, line 6 def orders Order.find(:all, params: { customer_id: self.id }) end
send_invite(customer_invite = ShopifyAPI::CustomerInvite.new)
click to toggle source
# File lib/shopify_api/resources/customer.rb, line 25 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