Class: Stripe::PaymentLocation
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::PaymentLocation
- Extended by:
- APIOperations::Create, APIOperations::List
- Includes:
- APIOperations::Delete, APIOperations::Save
- Defined in:
- lib/stripe/resources/payment_location.rb
Overview
A Payment Location represents a physical location where payments take place.
Defined Under Namespace
Classes: Address, BusinessRegistration, CapabilitySettings
Constant Summary collapse
- OBJECT_NAME =
"payment_location"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Attribute for field address.
-
#business_registration ⇒ Object
readonly
Identification numbers associated with the location.
-
#capability_settings ⇒ Object
readonly
The capability settings for the location.
-
#deleted ⇒ Object
readonly
Always true for a deleted object.
-
#display_name ⇒ Object
readonly
The display name of the 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.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.create(params = {}, opts = {}) ⇒ Object
Create a Payment Location.
-
.delete(id, params = {}, opts = {}) ⇒ Object
Delete a Payment Location.
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
List all Payment Locations.
- .object_name ⇒ Object
-
.update(id, params = {}, opts = {}) ⇒ Object
Update a Payment Location.
Instance Method Summary collapse
-
#delete(params = {}, opts = {}) ⇒ Object
Delete a Payment Location.
Methods included from APIOperations::Create
Methods included from APIOperations::List
Methods included from APIOperations::Save
Methods included from APIOperations::Delete
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
92 93 94 |
# File 'lib/stripe/resources/payment_location.rb', line 92 def address @address end |
#business_registration ⇒ Object (readonly)
Identification numbers associated with the location.
94 95 96 |
# File 'lib/stripe/resources/payment_location.rb', line 94 def business_registration @business_registration end |
#capability_settings ⇒ Object (readonly)
The capability settings for the location. Only applicable for locations with requested Payment Location Capabilities.
96 97 98 |
# File 'lib/stripe/resources/payment_location.rb', line 96 def capability_settings @capability_settings end |
#deleted ⇒ Object (readonly)
Always true for a deleted object
98 99 100 |
# File 'lib/stripe/resources/payment_location.rb', line 98 def deleted @deleted end |
#display_name ⇒ Object (readonly)
The display name of the location.
100 101 102 |
# File 'lib/stripe/resources/payment_location.rb', line 100 def display_name @display_name end |
#id ⇒ Object (readonly)
Unique identifier for the object.
102 103 104 |
# File 'lib/stripe/resources/payment_location.rb', line 102 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`.
104 105 106 |
# File 'lib/stripe/resources/payment_location.rb', line 104 def livemode @livemode end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
106 107 108 |
# File 'lib/stripe/resources/payment_location.rb', line 106 def object @object end |
Class Method Details
.create(params = {}, opts = {}) ⇒ Object
Create a Payment Location.
109 110 111 112 113 114 115 116 |
# File 'lib/stripe/resources/payment_location.rb', line 109 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/payment_locations", params: params, opts: opts ) end |
.delete(id, params = {}, opts = {}) ⇒ Object
Delete a Payment Location.
119 120 121 122 123 124 125 126 |
# File 'lib/stripe/resources/payment_location.rb', line 119 def self.delete(id, params = {}, opts = {}) request_stripe_object( method: :delete, path: format("/v1/payment_locations/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts ) end |
.field_remappings ⇒ Object
161 162 163 |
# File 'lib/stripe/resources/payment_location.rb', line 161 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
153 154 155 156 157 158 159 |
# File 'lib/stripe/resources/payment_location.rb', line 153 def self.inner_class_types @inner_class_types = { address: Address, business_registration: BusinessRegistration, capability_settings: CapabilitySettings, } end |
.list(params = {}, opts = {}) ⇒ Object
List all Payment Locations.
139 140 141 |
# File 'lib/stripe/resources/payment_location.rb', line 139 def self.list(params = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/payment_locations", params: params, opts: opts) end |
.object_name ⇒ Object
13 14 15 |
# File 'lib/stripe/resources/payment_location.rb', line 13 def self.object_name "payment_location" end |
.update(id, params = {}, opts = {}) ⇒ Object
Update a Payment Location.
144 145 146 147 148 149 150 151 |
# File 'lib/stripe/resources/payment_location.rb', line 144 def self.update(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_locations/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts ) end |
Instance Method Details
#delete(params = {}, opts = {}) ⇒ Object
Delete a Payment Location.
129 130 131 132 133 134 135 136 |
# File 'lib/stripe/resources/payment_location.rb', line 129 def delete(params = {}, opts = {}) request_stripe_object( method: :delete, path: format("/v1/payment_locations/%<id>s", { id: CGI.escape(self["id"]) }), params: params, opts: opts ) end |