Class: Stripe::TaxCode
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::TaxCode
- Extended by:
- APIOperations::List
- Defined in:
- lib/stripe/resources/tax_code.rb
Overview
[Tax codes](stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes.
Defined Under Namespace
Classes: Requirements
Constant Summary collapse
- OBJECT_NAME =
"tax_code"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
A detailed description of which types of products the tax code represents.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#name ⇒ Object
readonly
A short name for the tax code.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#requirements ⇒ Object
readonly
An object that describes more information about the tax location required for this tax code.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
A list of [all tax codes available](stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations.
- .object_name ⇒ Object
Methods included from APIOperations::List
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Attribute Details
#description ⇒ Object (readonly)
A detailed description of which types of products the tax code represents.
27 28 29 |
# File 'lib/stripe/resources/tax_code.rb', line 27 def description @description end |
#id ⇒ Object (readonly)
Unique identifier for the object.
29 30 31 |
# File 'lib/stripe/resources/tax_code.rb', line 29 def id @id end |
#name ⇒ Object (readonly)
A short name for the tax code.
31 32 33 |
# File 'lib/stripe/resources/tax_code.rb', line 31 def name @name end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
33 34 35 |
# File 'lib/stripe/resources/tax_code.rb', line 33 def object @object end |
#requirements ⇒ Object (readonly)
An object that describes more information about the tax location required for this tax code. Some [tax codes](/tax/tax-for-tickets/integration-guide#types-of-products) require a tax location of type ‘performance` to calculate tax correctly.
35 36 37 |
# File 'lib/stripe/resources/tax_code.rb', line 35 def requirements @requirements end |
Class Method Details
.field_remappings ⇒ Object
46 47 48 |
# File 'lib/stripe/resources/tax_code.rb', line 46 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
42 43 44 |
# File 'lib/stripe/resources/tax_code.rb', line 42 def self.inner_class_types @inner_class_types = { requirements: Requirements } end |
.list(params = {}, opts = {}) ⇒ Object
A list of [all tax codes available](stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations.
38 39 40 |
# File 'lib/stripe/resources/tax_code.rb', line 38 def self.list(params = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/tax_codes", params: params, opts: opts) end |
.object_name ⇒ Object
10 11 12 |
# File 'lib/stripe/resources/tax_code.rb', line 10 def self.object_name "tax_code" end |