Class: Stripe::Mandate
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Mandate
- Extended by:
- APIOperations::List
- Defined in:
- lib/stripe/resources/mandate.rb
Overview
A Mandate is a record of the permission that your customer gives you to debit their payment method.
Defined Under Namespace
Classes: CustomerAcceptance, MultiUse, PaymentMethodDetails, SingleUse
Constant Summary collapse
- OBJECT_NAME =
"mandate"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#customer_acceptance ⇒ Object
readonly
Attribute for field customer_acceptance.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
If the object exists in live mode, the value is ‘true`.
-
#multi_use ⇒ Object
readonly
Attribute for field multi_use.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#on_behalf_of ⇒ Object
readonly
The account (if any) that the mandate is intended for.
-
#payment_method ⇒ Object
readonly
ID of the payment method associated with this mandate.
-
#payment_method_details ⇒ Object
readonly
Attribute for field payment_method_details.
-
#single_use ⇒ Object
readonly
Attribute for field single_use.
-
#status ⇒ Object
readonly
The mandate status indicates whether or not you can use it to initiate a payment.
-
#type ⇒ Object
readonly
The type of the mandate.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
Retrieves a list of Mandates for a given PaymentMethod.
- .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
#customer_acceptance ⇒ Object (readonly)
Attribute for field customer_acceptance
440 441 442 |
# File 'lib/stripe/resources/mandate.rb', line 440 def customer_acceptance @customer_acceptance end |
#id ⇒ Object (readonly)
Unique identifier for the object.
442 443 444 |
# File 'lib/stripe/resources/mandate.rb', line 442 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`.
444 445 446 |
# File 'lib/stripe/resources/mandate.rb', line 444 def livemode @livemode end |
#multi_use ⇒ Object (readonly)
Attribute for field multi_use
446 447 448 |
# File 'lib/stripe/resources/mandate.rb', line 446 def multi_use @multi_use end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
448 449 450 |
# File 'lib/stripe/resources/mandate.rb', line 448 def object @object end |
#on_behalf_of ⇒ Object (readonly)
The account (if any) that the mandate is intended for.
450 451 452 |
# File 'lib/stripe/resources/mandate.rb', line 450 def on_behalf_of @on_behalf_of end |
#payment_method ⇒ Object (readonly)
ID of the payment method associated with this mandate.
452 453 454 |
# File 'lib/stripe/resources/mandate.rb', line 452 def payment_method @payment_method end |
#payment_method_details ⇒ Object (readonly)
Attribute for field payment_method_details
454 455 456 |
# File 'lib/stripe/resources/mandate.rb', line 454 def payment_method_details @payment_method_details end |
#single_use ⇒ Object (readonly)
Attribute for field single_use
456 457 458 |
# File 'lib/stripe/resources/mandate.rb', line 456 def single_use @single_use end |
#status ⇒ Object (readonly)
The mandate status indicates whether or not you can use it to initiate a payment.
458 459 460 |
# File 'lib/stripe/resources/mandate.rb', line 458 def status @status end |
#type ⇒ Object (readonly)
The type of the mandate.
460 461 462 |
# File 'lib/stripe/resources/mandate.rb', line 460 def type @type end |
Class Method Details
.field_remappings ⇒ Object
476 477 478 |
# File 'lib/stripe/resources/mandate.rb', line 476 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
467 468 469 470 471 472 473 474 |
# File 'lib/stripe/resources/mandate.rb', line 467 def self.inner_class_types @inner_class_types = { customer_acceptance: CustomerAcceptance, multi_use: MultiUse, payment_method_details: PaymentMethodDetails, single_use: SingleUse, } end |
.list(params = {}, opts = {}) ⇒ Object
Retrieves a list of Mandates for a given PaymentMethod.
463 464 465 |
# File 'lib/stripe/resources/mandate.rb', line 463 def self.list(params = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/mandates", params: params, opts: opts) end |
.object_name ⇒ Object
10 11 12 |
# File 'lib/stripe/resources/mandate.rb', line 10 def self.object_name "mandate" end |