Class: ShopifyAPI::Checkout
- Inherits:
-
Base
show all
- Defined in:
- lib/shopify_api/resources/checkout.rb
Instance Method Summary
collapse
Methods inherited from Base
activate_session, #as_json, clear_session, #encode, #headers, init_prefix, init_prefix_explicit, #persisted?
Methods included from Countable
#count
delete, headers
Instance Method Details
8
9
10
|
# File 'lib/shopify_api/resources/checkout.rb', line 8
def complete
post(:complete)
end
|
19
20
21
|
# File 'lib/shopify_api/resources/checkout.rb', line 19
def payments
Payment.find(:all, params: { checkout_id: id })
end
|
#ready? ⇒ Boolean
12
13
14
15
16
17
|
# File 'lib/shopify_api/resources/checkout.rb', line 12
def ready?
return false unless persisted?
reload
[200, 201].include?(ShopifyAPI::Base.connection.response.code.to_i)
end
|
#shipping_rates ⇒ Object
23
24
25
|
# File 'lib/shopify_api/resources/checkout.rb', line 23
def shipping_rates
ShippingRate.find(:all, params: { checkout_id: id })
end
|