Class: Stripe::Tax::Location
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Tax::Location
- Extended by:
- APIOperations::Create, APIOperations::List
- Defined in:
- lib/stripe/resources/tax/location.rb
Overview
Tax locations represent venues for services, tickets, or other product types.
Defined Under Namespace
Classes: Address
Constant Summary collapse
- OBJECT_NAME =
"tax.location"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Attribute for field address.
-
#description ⇒ Object
readonly
A descriptive text providing additional context about the tax location.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
If the object exists in live mode, the value is
true. -
#object ⇒ Object
readonly
String representing the object's type.
-
#type ⇒ Object
readonly
The type of tax location to be defined.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.create(params = {}, opts = {}) ⇒ Object
Create a tax location to use in calculating taxes for a service, ticket, or other type of product.
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
Retrieve a list of all tax locations.
- .object_name ⇒ Object
Methods included from APIOperations::Create
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
#address ⇒ Object (readonly)
Attribute for field address
39 40 41 |
# File 'lib/stripe/resources/tax/location.rb', line 39 def address @address end |
#description ⇒ Object (readonly)
A descriptive text providing additional context about the tax location. This can include information about the venue, types of events held, services available, or any relevant details for better identification (e.g., "A spacious auditorium suitable for large concerts and events.").
41 42 43 |
# File 'lib/stripe/resources/tax/location.rb', line 41 def description @description end |
#id ⇒ Object (readonly)
Unique identifier for the object.
43 44 45 |
# File 'lib/stripe/resources/tax/location.rb', line 43 def id @id end |
#livemode ⇒ Object (readonly)
If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
45 46 47 |
# File 'lib/stripe/resources/tax/location.rb', line 45 def livemode @livemode end |
#object ⇒ Object (readonly)
String representing the object's type. Objects of the same type share the same value.
47 48 49 |
# File 'lib/stripe/resources/tax/location.rb', line 47 def object @object end |
#type ⇒ Object (readonly)
The type of tax location to be defined. Currently the only option is performance.
49 50 51 |
# File 'lib/stripe/resources/tax/location.rb', line 49 def type @type end |
Class Method Details
.create(params = {}, opts = {}) ⇒ Object
Create a tax location to use in calculating taxes for a service, ticket, or other type of product. The resulting object contains the id, address, name, description, and current operational status of the tax location.
52 53 54 |
# File 'lib/stripe/resources/tax/location.rb', line 52 def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/tax/locations", params: params, opts: opts) end |
.field_remappings ⇒ Object
69 70 71 |
# File 'lib/stripe/resources/tax/location.rb', line 69 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
65 66 67 |
# File 'lib/stripe/resources/tax/location.rb', line 65 def self.inner_class_types @inner_class_types = { address: Address } end |
.list(params = {}, opts = {}) ⇒ Object
Retrieve a list of all tax locations. Tax locations can represent the venues for services, tickets, or other product types.
The response includes detailed information for each tax location, such as its address, name, description, and current operational status.
You can paginate through the list by using the limit parameter to control the number of results returned in each request.
61 62 63 |
# File 'lib/stripe/resources/tax/location.rb', line 61 def self.list(params = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/tax/locations", params: params, opts: opts) end |
.object_name ⇒ Object
12 13 14 |
# File 'lib/stripe/resources/tax/location.rb', line 12 def self.object_name "tax.location" end |