Class: Stripe::Tax::Location

Inherits:
APIResource show all
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

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods included from APIOperations::Create

create

Methods included from APIOperations::List

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

included

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

#addressObject (readonly)

Attribute for field address



39
40
41
# File 'lib/stripe/resources/tax/location.rb', line 39

def address
  @address
end

#descriptionObject (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

#idObject (readonly)

Unique identifier for the object.



43
44
45
# File 'lib/stripe/resources/tax/location.rb', line 43

def id
  @id
end

#livemodeObject (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

#objectObject (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

#typeObject (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_remappingsObject



69
70
71
# File 'lib/stripe/resources/tax/location.rb', line 69

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



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_nameObject



12
13
14
# File 'lib/stripe/resources/tax/location.rb', line 12

def self.object_name
  "tax.location"
end