Class: Stripe::Order::CreateParams

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

Defined Under Namespace

Classes: AutomaticTax, BillingDetails, 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, 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.



1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
# File 'lib/stripe/resources/order.rb', line 1935

def initialize(
  automatic_tax: nil,
  billing_details: 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
  @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.



1907
1908
1909
# File 'lib/stripe/resources/order.rb', line 1907

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.



1909
1910
1911
# File 'lib/stripe/resources/order.rb', line 1909

def billing_details
  @billing_details
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).



1911
1912
1913
# File 'lib/stripe/resources/order.rb', line 1911

def currency
  @currency
end

#customerObject

The customer associated with this order.



1913
1914
1915
# File 'lib/stripe/resources/order.rb', line 1913

def customer
  @customer
end

#descriptionObject

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



1915
1916
1917
# File 'lib/stripe/resources/order.rb', line 1915

def description
  @description
end

#discountsObject

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



1917
1918
1919
# File 'lib/stripe/resources/order.rb', line 1917

def discounts
  @discounts
end

#expandObject

Specifies which fields in the response should be expanded.



1919
1920
1921
# File 'lib/stripe/resources/order.rb', line 1919

def expand
  @expand
end

#ip_addressObject

The IP address of the purchaser for this order.



1921
1922
1923
# File 'lib/stripe/resources/order.rb', line 1921

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.



1923
1924
1925
# File 'lib/stripe/resources/order.rb', line 1923

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`.



1925
1926
1927
# File 'lib/stripe/resources/order.rb', line 1925

def 
  @metadata
end

#paymentObject

Payment information associated with the order, including payment settings.



1927
1928
1929
# File 'lib/stripe/resources/order.rb', line 1927

def payment
  @payment
end

#shipping_costObject

Settings for the customer cost of shipping for this order.



1929
1930
1931
# File 'lib/stripe/resources/order.rb', line 1929

def shipping_cost
  @shipping_cost
end

#shipping_detailsObject

Shipping details for the order.



1931
1932
1933
# File 'lib/stripe/resources/order.rb', line 1931

def shipping_details
  @shipping_details
end

#tax_detailsObject

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



1933
1934
1935
# File 'lib/stripe/resources/order.rb', line 1933

def tax_details
  @tax_details
end