Class: Stripe::V2::Tax::AutomaticRuleService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::V2::Tax::AutomaticRuleService
- Defined in:
- lib/stripe/services/v2/tax/automatic_rule_service.rb
Defined Under Namespace
Classes: CreateParams, DeactivateParams, FindParams, RetrieveParams, UpdateParams
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Object
Creates an AutomaticRule object.
-
#deactivate(id, params = {}, opts = {}) ⇒ Object
Deactivates an AutomaticRule object.
-
#find(params = {}, opts = {}) ⇒ Object
Finds an AutomaticRule object by BillableItem ID.
-
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieves an AutomaticRule object by ID.
-
#update(id, params = {}, opts = {}) ⇒ Object
Updates the automatic Tax configuration for an AutomaticRule 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 an AutomaticRule object.
43 44 45 46 47 48 49 50 51 |
# File 'lib/stripe/services/v2/tax/automatic_rule_service.rb', line 43 def create(params = {}, opts = {}) request( method: :post, path: "/v2/tax/automatic_rules", params: params, opts: opts, base_address: :api ) end |
#deactivate(id, params = {}, opts = {}) ⇒ Object
Deactivates an AutomaticRule object. Deactivated AutomaticRule objects are ignored in future tax calculations.
54 55 56 57 58 59 60 61 62 |
# File 'lib/stripe/services/v2/tax/automatic_rule_service.rb', line 54 def deactivate(id, params = {}, opts = {}) request( method: :post, path: format("/v2/tax/automatic_rules/%<id>s/deactivate", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#find(params = {}, opts = {}) ⇒ Object
Finds an AutomaticRule object by BillableItem ID.
65 66 67 68 69 70 71 72 73 |
# File 'lib/stripe/services/v2/tax/automatic_rule_service.rb', line 65 def find(params = {}, opts = {}) request( method: :get, path: "/v2/tax/automatic_rules/find", params: params, opts: opts, base_address: :api ) end |
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieves an AutomaticRule object by ID.
76 77 78 79 80 81 82 83 84 |
# File 'lib/stripe/services/v2/tax/automatic_rule_service.rb', line 76 def retrieve(id, params = {}, opts = {}) request( method: :get, path: format("/v2/tax/automatic_rules/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#update(id, params = {}, opts = {}) ⇒ Object
Updates the automatic Tax configuration for an AutomaticRule object.
87 88 89 90 91 92 93 94 95 |
# File 'lib/stripe/services/v2/tax/automatic_rule_service.rb', line 87 def update(id, params = {}, opts = {}) request( method: :post, path: format("/v2/tax/automatic_rules/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |