Class: Stripe::Mandate

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

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

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?, #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_acceptanceObject (readonly)

Attribute for field customer_acceptance



405
406
407
# File 'lib/stripe/resources/mandate.rb', line 405

def customer_acceptance
  @customer_acceptance
end

#idObject (readonly)

Unique identifier for the object.



407
408
409
# File 'lib/stripe/resources/mandate.rb', line 407

def id
  @id
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



409
410
411
# File 'lib/stripe/resources/mandate.rb', line 409

def livemode
  @livemode
end

#multi_useObject (readonly)

Attribute for field multi_use



411
412
413
# File 'lib/stripe/resources/mandate.rb', line 411

def multi_use
  @multi_use
end

#objectObject (readonly)

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



413
414
415
# File 'lib/stripe/resources/mandate.rb', line 413

def object
  @object
end

#on_behalf_ofObject (readonly)

The account (if any) that the mandate is intended for.



415
416
417
# File 'lib/stripe/resources/mandate.rb', line 415

def on_behalf_of
  @on_behalf_of
end

#payment_methodObject (readonly)

ID of the payment method associated with this mandate.



417
418
419
# File 'lib/stripe/resources/mandate.rb', line 417

def payment_method
  @payment_method
end

#payment_method_detailsObject (readonly)

Attribute for field payment_method_details



419
420
421
# File 'lib/stripe/resources/mandate.rb', line 419

def payment_method_details
  @payment_method_details
end

#single_useObject (readonly)

Attribute for field single_use



421
422
423
# File 'lib/stripe/resources/mandate.rb', line 421

def single_use
  @single_use
end

#statusObject (readonly)

The mandate status indicates whether or not you can use it to initiate a payment.



423
424
425
# File 'lib/stripe/resources/mandate.rb', line 423

def status
  @status
end

#typeObject (readonly)

The type of the mandate.



425
426
427
# File 'lib/stripe/resources/mandate.rb', line 425

def type
  @type
end

Class Method Details

.field_remappingsObject



441
442
443
# File 'lib/stripe/resources/mandate.rb', line 441

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



432
433
434
435
436
437
438
439
# File 'lib/stripe/resources/mandate.rb', line 432

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.



428
429
430
# File 'lib/stripe/resources/mandate.rb', line 428

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

.object_nameObject



10
11
12
# File 'lib/stripe/resources/mandate.rb', line 10

def self.object_name
  "mandate"
end