Class: Stripe::V2::Billing::CustomPricingUnitService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::V2::Billing::CustomPricingUnitService
- Defined in:
- lib/stripe/services/v2/billing/custom_pricing_unit_service.rb
Defined Under Namespace
Classes: CreateParams, ListParams, RetrieveParams, UpdateParams
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Object
Create a Custom Pricing Unit object.
-
#list(params = {}, opts = {}) ⇒ Object
List all Custom Pricing Unit objects.
-
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieve a Custom Pricing Unit object.
-
#update(id, params = {}, opts = {}) ⇒ Object
Update a Custom Pricing Unit 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
Create a Custom Pricing Unit object.
63 64 65 66 67 68 69 70 71 |
# File 'lib/stripe/services/v2/billing/custom_pricing_unit_service.rb', line 63 def create(params = {}, opts = {}) request( method: :post, path: "/v2/billing/custom_pricing_units", params: params, opts: opts, base_address: :api ) end |
#list(params = {}, opts = {}) ⇒ Object
List all Custom Pricing Unit objects.
74 75 76 77 78 79 80 81 82 |
# File 'lib/stripe/services/v2/billing/custom_pricing_unit_service.rb', line 74 def list(params = {}, opts = {}) request( method: :get, path: "/v2/billing/custom_pricing_units", params: params, opts: opts, base_address: :api ) end |
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieve a Custom Pricing Unit object.
85 86 87 88 89 90 91 92 93 |
# File 'lib/stripe/services/v2/billing/custom_pricing_unit_service.rb', line 85 def retrieve(id, params = {}, opts = {}) request( method: :get, path: format("/v2/billing/custom_pricing_units/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#update(id, params = {}, opts = {}) ⇒ Object
Update a Custom Pricing Unit object.
96 97 98 99 100 101 102 103 104 |
# File 'lib/stripe/services/v2/billing/custom_pricing_unit_service.rb', line 96 def update(id, params = {}, opts = {}) request( method: :post, path: format("/v2/billing/custom_pricing_units/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |