Class: Stripe::SourceService::CreateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/services/source_service.rb

Defined Under Namespace

Classes: Mandate, Owner, Receiver, Redirect, SourceOrder

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(amount: nil, currency: nil, customer: nil, expand: nil, flow: nil, mandate: nil, metadata: nil, original_source: nil, owner: nil, receiver: nil, redirect: nil, source_order: nil, statement_descriptor: nil, token: nil, type: nil, usage: nil) ⇒ CreateParams

Returns a new instance of CreateParams.



656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
# File 'lib/stripe/services/source_service.rb', line 656

def initialize(
  amount: nil,
  currency: nil,
  customer: nil,
  expand: nil,
  flow: nil,
  mandate: nil,
  metadata: nil,
  original_source: nil,
  owner: nil,
  receiver: nil,
  redirect: nil,
  source_order: nil,
  statement_descriptor: nil,
  token: nil,
  type: nil,
  usage: nil
)
  @amount = amount
  @currency = currency
  @customer = customer
  @expand = expand
  @flow = flow
  @mandate = mandate
  @metadata = 
  @original_source = original_source
  @owner = owner
  @receiver = receiver
  @redirect = redirect
  @source_order = source_order
  @statement_descriptor = statement_descriptor
  @token = token
  @type = type
  @usage = usage
end

Instance Attribute Details

#amountObject

Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for ‘single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land.



609
610
611
# File 'lib/stripe/services/source_service.rb', line 609

def amount
  @amount
end

#currencyObject

Three-letter [ISO code for the currency](stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready.



612
613
614
# File 'lib/stripe/services/source_service.rb', line 612

def currency
  @currency
end

#customerObject

The ‘Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`).



615
616
617
# File 'lib/stripe/services/source_service.rb', line 615

def customer
  @customer
end

#expandObject

Specifies which fields in the response should be expanded.



618
619
620
# File 'lib/stripe/services/source_service.rb', line 618

def expand
  @expand
end

#flowObject

The authentication ‘flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows.



621
622
623
# File 'lib/stripe/services/source_service.rb', line 621

def flow
  @flow
end

#mandateObject

Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.



624
625
626
# File 'lib/stripe/services/source_service.rb', line 624

def mandate
  @mandate
end

#metadataObject

Attribute for param field metadata



627
628
629
# File 'lib/stripe/services/source_service.rb', line 627

def 
  @metadata
end

#original_sourceObject

The source to share.



630
631
632
# File 'lib/stripe/services/source_service.rb', line 630

def original_source
  @original_source
end

#ownerObject

Information about the owner of the payment instrument that may be used or required by particular source types.



633
634
635
# File 'lib/stripe/services/source_service.rb', line 633

def owner
  @owner
end

#receiverObject

Optional parameters for the receiver flow. Can be set only if the source is a receiver (‘flow` is `receiver`).



636
637
638
# File 'lib/stripe/services/source_service.rb', line 636

def receiver
  @receiver
end

#redirectObject

Parameters required for the redirect flow. Required if the source is authenticated by a redirect (‘flow` is `redirect`).



639
640
641
# File 'lib/stripe/services/source_service.rb', line 639

def redirect
  @redirect
end

#source_orderObject

Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.



642
643
644
# File 'lib/stripe/services/source_service.rb', line 642

def source_order
  @source_order
end

#statement_descriptorObject

An arbitrary string to be displayed on your customer’s statement. As an example, if your website is ‘RunClub` and the item you’re charging for is a race ticket, you may want to specify a ‘statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all.



645
646
647
# File 'lib/stripe/services/source_service.rb', line 645

def statement_descriptor
  @statement_descriptor
end

#tokenObject

An optional token used to create the source. When passed, token properties will override source parameters.



648
649
650
# File 'lib/stripe/services/source_service.rb', line 648

def token
  @token
end

#typeObject

The ‘type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](stripe.com/docs/sources/connect#cloning-card-sources) guide)



651
652
653
# File 'lib/stripe/services/source_service.rb', line 651

def type
  @type
end

#usageObject

Attribute for param field usage



654
655
656
# File 'lib/stripe/services/source_service.rb', line 654

def usage
  @usage
end