Class: Stripe::OrderService::CreateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/services/order_service.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.



1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
# File 'lib/stripe/services/order_service.rb', line 1191

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.



1147
1148
1149
# File 'lib/stripe/services/order_service.rb', line 1147

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.



1150
1151
1152
# File 'lib/stripe/services/order_service.rb', line 1150

def billing_details
  @billing_details
end

#creditsObject

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



1153
1154
1155
# File 'lib/stripe/services/order_service.rb', line 1153

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



1156
1157
1158
# File 'lib/stripe/services/order_service.rb', line 1156

def currency
  @currency
end

#customerObject

The customer associated with this order.



1159
1160
1161
# File 'lib/stripe/services/order_service.rb', line 1159

def customer
  @customer
end

#descriptionObject

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



1162
1163
1164
# File 'lib/stripe/services/order_service.rb', line 1162

def description
  @description
end

#discountsObject

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



1165
1166
1167
# File 'lib/stripe/services/order_service.rb', line 1165

def discounts
  @discounts
end

#expandObject

Specifies which fields in the response should be expanded.



1168
1169
1170
# File 'lib/stripe/services/order_service.rb', line 1168

def expand
  @expand
end

#ip_addressObject

The IP address of the purchaser for this order.



1171
1172
1173
# File 'lib/stripe/services/order_service.rb', line 1171

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.



1174
1175
1176
# File 'lib/stripe/services/order_service.rb', line 1174

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



1177
1178
1179
# File 'lib/stripe/services/order_service.rb', line 1177

def 
  @metadata
end

#paymentObject

Payment information associated with the order, including payment settings.



1180
1181
1182
# File 'lib/stripe/services/order_service.rb', line 1180

def payment
  @payment
end

#shipping_costObject

Settings for the customer cost of shipping for this order.



1183
1184
1185
# File 'lib/stripe/services/order_service.rb', line 1183

def shipping_cost
  @shipping_cost
end

#shipping_detailsObject

Shipping details for the order.



1186
1187
1188
# File 'lib/stripe/services/order_service.rb', line 1186

def shipping_details
  @shipping_details
end

#tax_detailsObject

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



1189
1190
1191
# File 'lib/stripe/services/order_service.rb', line 1189

def tax_details
  @tax_details
end