Class: Stripe::OrderCreateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/params/order_create_params.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) ⇒ OrderCreateParams

Returns a new instance of OrderCreateParams.



1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
# File 'lib/stripe/params/order_create_params.rb', line 1092

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.



1064
1065
1066
# File 'lib/stripe/params/order_create_params.rb', line 1064

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.



1066
1067
1068
# File 'lib/stripe/params/order_create_params.rb', line 1066

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



1068
1069
1070
# File 'lib/stripe/params/order_create_params.rb', line 1068

def currency
  @currency
end

#customerObject

The customer associated with this order.



1070
1071
1072
# File 'lib/stripe/params/order_create_params.rb', line 1070

def customer
  @customer
end

#descriptionObject

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



1072
1073
1074
# File 'lib/stripe/params/order_create_params.rb', line 1072

def description
  @description
end

#discountsObject

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



1074
1075
1076
# File 'lib/stripe/params/order_create_params.rb', line 1074

def discounts
  @discounts
end

#expandObject

Specifies which fields in the response should be expanded.



1076
1077
1078
# File 'lib/stripe/params/order_create_params.rb', line 1076

def expand
  @expand
end

#ip_addressObject

The IP address of the purchaser for this order.



1078
1079
1080
# File 'lib/stripe/params/order_create_params.rb', line 1078

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.



1080
1081
1082
# File 'lib/stripe/params/order_create_params.rb', line 1080

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



1082
1083
1084
# File 'lib/stripe/params/order_create_params.rb', line 1082

def 
  @metadata
end

#paymentObject

Payment information associated with the order, including payment settings.



1084
1085
1086
# File 'lib/stripe/params/order_create_params.rb', line 1084

def payment
  @payment
end

#shipping_costObject

Settings for the customer cost of shipping for this order.



1086
1087
1088
# File 'lib/stripe/params/order_create_params.rb', line 1086

def shipping_cost
  @shipping_cost
end

#shipping_detailsObject

Shipping details for the order.



1088
1089
1090
# File 'lib/stripe/params/order_create_params.rb', line 1088

def shipping_details
  @shipping_details
end

#tax_detailsObject

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



1090
1091
1092
# File 'lib/stripe/params/order_create_params.rb', line 1090

def tax_details
  @tax_details
end