Class: Stripe::ShippingRateService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::ShippingRateService
- Defined in:
- lib/stripe/services/shipping_rate_service.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Object
Creates a new shipping rate object.
-
#list(params = {}, opts = {}) ⇒ Object
Returns a list of your shipping rates.
-
#retrieve(shipping_rate_token, params = {}, opts = {}) ⇒ Object
Returns the shipping rate object with the given ID.
-
#update(shipping_rate_token, params = {}, opts = {}) ⇒ Object
Updates an existing shipping rate object.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#create(params = {}, opts = {}) ⇒ Object
Creates a new shipping rate object.
7 8 9 10 11 12 13 14 15 |
# File 'lib/stripe/services/shipping_rate_service.rb', line 7 def create(params = {}, opts = {}) request( method: :post, path: "/v1/shipping_rates", params: params, opts: opts, base_address: :api ) end |
#list(params = {}, opts = {}) ⇒ Object
Returns a list of your shipping rates.
18 19 20 21 22 23 24 25 26 |
# File 'lib/stripe/services/shipping_rate_service.rb', line 18 def list(params = {}, opts = {}) request( method: :get, path: "/v1/shipping_rates", params: params, opts: opts, base_address: :api ) end |
#retrieve(shipping_rate_token, params = {}, opts = {}) ⇒ Object
Returns the shipping rate object with the given ID.
29 30 31 32 33 34 35 36 37 |
# File 'lib/stripe/services/shipping_rate_service.rb', line 29 def retrieve(shipping_rate_token, params = {}, opts = {}) request( method: :get, path: format("/v1/shipping_rates/%<shipping_rate_token>s", { shipping_rate_token: CGI.escape(shipping_rate_token) }), params: params, opts: opts, base_address: :api ) end |
#update(shipping_rate_token, params = {}, opts = {}) ⇒ Object
Updates an existing shipping rate object.
40 41 42 43 44 45 46 47 48 |
# File 'lib/stripe/services/shipping_rate_service.rb', line 40 def update(shipping_rate_token, params = {}, opts = {}) request( method: :post, path: format("/v1/shipping_rates/%<shipping_rate_token>s", { shipping_rate_token: CGI.escape(shipping_rate_token) }), params: params, opts: opts, base_address: :api ) end |