Class: Stripe::Customer::CreateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/resources/customer.rb

Defined Under Namespace

Classes: Address, CashBalance, InvoiceSettings, Shipping, Tax, TaxIdDatum

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(address: nil, balance: nil, cash_balance: nil, coupon: nil, description: nil, email: nil, expand: nil, invoice_prefix: nil, invoice_settings: nil, metadata: nil, name: nil, next_invoice_sequence: nil, payment_method: nil, phone: nil, preferred_locales: nil, promotion_code: nil, shipping: nil, source: nil, tax: nil, tax_exempt: nil, tax_id_data: nil, test_clock: nil, validate: nil) ⇒ CreateParams

Returns a new instance of CreateParams.



632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
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
# File 'lib/stripe/resources/customer.rb', line 632

def initialize(
  address: nil,
  balance: nil,
  cash_balance: nil,
  coupon: nil,
  description: nil,
  email: nil,
  expand: nil,
  invoice_prefix: nil,
  invoice_settings: nil,
  metadata: nil,
  name: nil,
  next_invoice_sequence: nil,
  payment_method: nil,
  phone: nil,
  preferred_locales: nil,
  promotion_code: nil,
  shipping: nil,
  source: nil,
  tax: nil,
  tax_exempt: nil,
  tax_id_data: nil,
  test_clock: nil,
  validate: nil
)
  @address = address
  @balance = balance
  @cash_balance = cash_balance
  @coupon = coupon
  @description = description
  @email = email
  @expand = expand
  @invoice_prefix = invoice_prefix
  @invoice_settings = invoice_settings
  @metadata = 
  @name = name
  @next_invoice_sequence = next_invoice_sequence
  @payment_method = payment_method
  @phone = phone
  @preferred_locales = preferred_locales
  @promotion_code = promotion_code
  @shipping = shipping
  @source = source
  @tax = tax
  @tax_exempt = tax_exempt
  @tax_id_data = tax_id_data
  @test_clock = test_clock
  @validate = validate
end

Instance Attribute Details

#addressObject

The customer’s address.



586
587
588
# File 'lib/stripe/resources/customer.rb', line 586

def address
  @address
end

#balanceObject

An integer amount in cents (or local equivalent) that represents the customer’s current balance, which affect the customer’s future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.



588
589
590
# File 'lib/stripe/resources/customer.rb', line 588

def balance
  @balance
end

#cash_balanceObject

Balance information and default balance settings for this customer.



590
591
592
# File 'lib/stripe/resources/customer.rb', line 590

def cash_balance
  @cash_balance
end

#couponObject

Attribute for param field coupon



592
593
594
# File 'lib/stripe/resources/customer.rb', line 592

def coupon
  @coupon
end

#descriptionObject

An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.



594
595
596
# File 'lib/stripe/resources/customer.rb', line 594

def description
  @description
end

#emailObject

Customer’s email address. It’s displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.



596
597
598
# File 'lib/stripe/resources/customer.rb', line 596

def email
  @email
end

#expandObject

Specifies which fields in the response should be expanded.



598
599
600
# File 'lib/stripe/resources/customer.rb', line 598

def expand
  @expand
end

#invoice_prefixObject

The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.



600
601
602
# File 'lib/stripe/resources/customer.rb', line 600

def invoice_prefix
  @invoice_prefix
end

#invoice_settingsObject

Default invoice settings for this customer.



602
603
604
# File 'lib/stripe/resources/customer.rb', line 602

def invoice_settings
  @invoice_settings
end

#metadataObject

Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to ‘metadata`.



604
605
606
# File 'lib/stripe/resources/customer.rb', line 604

def 
  @metadata
end

#nameObject

The customer’s full name or business name.



606
607
608
# File 'lib/stripe/resources/customer.rb', line 606

def name
  @name
end

#next_invoice_sequenceObject

The sequence to be used on the customer’s next invoice. Defaults to 1.



608
609
610
# File 'lib/stripe/resources/customer.rb', line 608

def next_invoice_sequence
  @next_invoice_sequence
end

#payment_methodObject

Attribute for param field payment_method



610
611
612
# File 'lib/stripe/resources/customer.rb', line 610

def payment_method
  @payment_method
end

#phoneObject

The customer’s phone number.



612
613
614
# File 'lib/stripe/resources/customer.rb', line 612

def phone
  @phone
end

#preferred_localesObject

Customer’s preferred languages, ordered by preference.



614
615
616
# File 'lib/stripe/resources/customer.rb', line 614

def preferred_locales
  @preferred_locales
end

#promotion_codeObject

The ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount.



616
617
618
# File 'lib/stripe/resources/customer.rb', line 616

def promotion_code
  @promotion_code
end

#shippingObject

The customer’s shipping information. Appears on invoices emailed to this customer.



618
619
620
# File 'lib/stripe/resources/customer.rb', line 618

def shipping
  @shipping
end

#sourceObject

Attribute for param field source



620
621
622
# File 'lib/stripe/resources/customer.rb', line 620

def source
  @source
end

#taxObject

Tax details about the customer.



622
623
624
# File 'lib/stripe/resources/customer.rb', line 622

def tax
  @tax
end

#tax_exemptObject

The customer’s tax exemption. One of ‘none`, `exempt`, or `reverse`.



624
625
626
# File 'lib/stripe/resources/customer.rb', line 624

def tax_exempt
  @tax_exempt
end

#tax_id_dataObject

The customer’s tax IDs.



626
627
628
# File 'lib/stripe/resources/customer.rb', line 626

def tax_id_data
  @tax_id_data
end

#test_clockObject

ID of the test clock to attach to the customer.



628
629
630
# File 'lib/stripe/resources/customer.rb', line 628

def test_clock
  @test_clock
end

#validateObject

Attribute for param field validate



630
631
632
# File 'lib/stripe/resources/customer.rb', line 630

def validate
  @validate
end