Class: Stripe::PaymentLocationCapability

Inherits:
APIResource show all
Extended by:
APIOperations::List
Includes:
APIOperations::Save
Defined in:
lib/stripe/resources/payment_location_capability.rb

Overview

A ‘payment_location` capability represents a capability for a Stripe account at a payment location.

Defined Under Namespace

Classes: Requirements

Constant Summary collapse

OBJECT_NAME =
"payment_location_capability"

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::List

list

Methods included from APIOperations::Save

included, #save

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

#accountObject (readonly)

The account that the capability enables functionality for.



48
49
50
# File 'lib/stripe/resources/payment_location_capability.rb', line 48

def 
  @account
end

#capabilityObject (readonly)

The identifier for the capability.



50
51
52
# File 'lib/stripe/resources/payment_location_capability.rb', line 50

def capability
  @capability
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`.



52
53
54
# File 'lib/stripe/resources/payment_location_capability.rb', line 52

def livemode
  @livemode
end

#locationObject (readonly)

The payment location that the capability enables functionality for.



54
55
56
# File 'lib/stripe/resources/payment_location_capability.rb', line 54

def location
  @location
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value.



56
57
58
# File 'lib/stripe/resources/payment_location_capability.rb', line 56

def object
  @object
end

#requestedObject (readonly)

Whether the capability has been requested.



58
59
60
# File 'lib/stripe/resources/payment_location_capability.rb', line 58

def requested
  @requested
end

#requested_atObject (readonly)

Time when the capability was requested. Measured in seconds since the Unix epoch.



60
61
62
# File 'lib/stripe/resources/payment_location_capability.rb', line 60

def requested_at
  @requested_at
end

#requirementsObject (readonly)

Attribute for field requirements



62
63
64
# File 'lib/stripe/resources/payment_location_capability.rb', line 62

def requirements
  @requirements
end

#statusObject (readonly)

The status of the capability.



64
65
66
# File 'lib/stripe/resources/payment_location_capability.rb', line 64

def status
  @status
end

Class Method Details

.field_remappingsObject



90
91
92
# File 'lib/stripe/resources/payment_location_capability.rb', line 90

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



86
87
88
# File 'lib/stripe/resources/payment_location_capability.rb', line 86

def self.inner_class_types
  @inner_class_types = { requirements: Requirements }
end

.list(params = {}, opts = {}) ⇒ Object

List all payment location capabilities associated with the payment location.



67
68
69
70
71
72
73
74
# File 'lib/stripe/resources/payment_location_capability.rb', line 67

def self.list(params = {}, opts = {})
  request_stripe_object(
    method: :get,
    path: "/v1/payment_location_capabilities",
    params: params,
    opts: opts
  )
end

.object_nameObject



11
12
13
# File 'lib/stripe/resources/payment_location_capability.rb', line 11

def self.object_name
  "payment_location_capability"
end

.update(capability, params = {}, opts = {}) ⇒ Object

Updates a payment_location capability. Request or remove a payment_location capability by updating its requested parameter.



77
78
79
80
81
82
83
84
# File 'lib/stripe/resources/payment_location_capability.rb', line 77

def self.update(capability, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/payment_location_capabilities/%<capability>s", { capability: CGI.escape(capability) }),
    params: params,
    opts: opts
  )
end