Class: Stripe::Order::CreateParams

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

Defined Under Namespace

Classes: AutomaticTax, BillingDetails, Credit, Discount, LineItem, Payment, ShippingCost, ShippingDetails, TaxDetails

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(automatic_tax: nil, billing_details: nil, credits: nil, currency: nil, customer: nil, description: nil, discounts: nil, expand: nil, ip_address: nil, line_items: nil, metadata: nil, payment: nil, shipping_cost: nil, shipping_details: nil, tax_details: nil) ⇒ CreateParams

Returns a new instance of CreateParams.



1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
# File 'lib/stripe/resources/order.rb', line 1777

def initialize(
  automatic_tax: nil,
  billing_details: nil,
  credits: nil,
  currency: nil,
  customer: nil,
  description: nil,
  discounts: nil,
  expand: nil,
  ip_address: nil,
  line_items: nil,
  metadata: nil,
  payment: nil,
  shipping_cost: nil,
  shipping_details: nil,
  tax_details: nil
)
  @automatic_tax = automatic_tax
  @billing_details = billing_details
  @credits = credits
  @currency = currency
  @customer = customer
  @description = description
  @discounts = discounts
  @expand = expand
  @ip_address = ip_address
  @line_items = line_items
  @metadata = 
  @payment = payment
  @shipping_cost = shipping_cost
  @shipping_details = shipping_details
  @tax_details = tax_details
end

Instance Attribute Details

#automatic_taxObject

Settings for automatic tax calculation for this order.



1733
1734
1735
# File 'lib/stripe/resources/order.rb', line 1733

def automatic_tax
  @automatic_tax
end

#billing_detailsObject

Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided.



1736
1737
1738
# File 'lib/stripe/resources/order.rb', line 1736

def billing_details
  @billing_details
end

#creditsObject

The credits to apply to the order, only ‘gift_card` currently supported.



1739
1740
1741
# File 'lib/stripe/resources/order.rb', line 1739

def credits
  @credits
end

#currencyObject

Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).



1742
1743
1744
# File 'lib/stripe/resources/order.rb', line 1742

def currency
  @currency
end

#customerObject

The customer associated with this order.



1745
1746
1747
# File 'lib/stripe/resources/order.rb', line 1745

def customer
  @customer
end

#descriptionObject

An arbitrary string attached to the object. Often useful for displaying to users.



1748
1749
1750
# File 'lib/stripe/resources/order.rb', line 1748

def description
  @description
end

#discountsObject

The coupons, promotion codes, and/or discounts to apply to the order.



1751
1752
1753
# File 'lib/stripe/resources/order.rb', line 1751

def discounts
  @discounts
end

#expandObject

Specifies which fields in the response should be expanded.



1754
1755
1756
# File 'lib/stripe/resources/order.rb', line 1754

def expand
  @expand
end

#ip_addressObject

The IP address of the purchaser for this order.



1757
1758
1759
# File 'lib/stripe/resources/order.rb', line 1757

def ip_address
  @ip_address
end

#line_itemsObject

A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost.



1760
1761
1762
# File 'lib/stripe/resources/order.rb', line 1760

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



1763
1764
1765
# File 'lib/stripe/resources/order.rb', line 1763

def 
  @metadata
end

#paymentObject

Payment information associated with the order, including payment settings.



1766
1767
1768
# File 'lib/stripe/resources/order.rb', line 1766

def payment
  @payment
end

#shipping_costObject

Settings for the customer cost of shipping for this order.



1769
1770
1771
# File 'lib/stripe/resources/order.rb', line 1769

def shipping_cost
  @shipping_cost
end

#shipping_detailsObject

Shipping details for the order.



1772
1773
1774
# File 'lib/stripe/resources/order.rb', line 1772

def shipping_details
  @shipping_details
end

#tax_detailsObject

Additional tax details about the purchaser to be used for this order.



1775
1776
1777
# File 'lib/stripe/resources/order.rb', line 1775

def tax_details
  @tax_details
end