Class: Stripe::OrderService::CreateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::OrderService::CreateParams
- 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
-
#automatic_tax ⇒ Object
Settings for automatic tax calculation for this order.
-
#billing_details ⇒ Object
Billing details for the customer.
-
#credits ⇒ Object
The credits to apply to the order, only ‘gift_card` currently supported.
-
#currency ⇒ Object
Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase.
-
#customer ⇒ Object
The customer associated with this order.
-
#description ⇒ Object
An arbitrary string attached to the object.
-
#discounts ⇒ Object
The coupons, promotion codes, and/or discounts to apply to the order.
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#ip_address ⇒ Object
The IP address of the purchaser for this order.
-
#line_items ⇒ Object
A list of line items the customer is ordering.
-
#metadata ⇒ Object
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#payment ⇒ Object
Payment information associated with the order, including payment settings.
-
#shipping_cost ⇒ Object
Settings for the customer cost of shipping for this order.
-
#shipping_details ⇒ Object
Shipping details for the order.
-
#tax_details ⇒ Object
Additional tax details about the purchaser to be used for this order.
Instance Method Summary collapse
-
#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
constructor
A new instance of CreateParams.
Methods inherited from RequestParams
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.
1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 |
# File 'lib/stripe/services/order_service.rb', line 1065 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 = @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_tax ⇒ Object
Settings for automatic tax calculation for this order.
1035 1036 1037 |
# File 'lib/stripe/services/order_service.rb', line 1035 def automatic_tax @automatic_tax end |
#billing_details ⇒ Object
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.
1037 1038 1039 |
# File 'lib/stripe/services/order_service.rb', line 1037 def billing_details @billing_details end |
#credits ⇒ Object
The credits to apply to the order, only ‘gift_card` currently supported.
1039 1040 1041 |
# File 'lib/stripe/services/order_service.rb', line 1039 def credits @credits end |
#currency ⇒ Object
Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).
1041 1042 1043 |
# File 'lib/stripe/services/order_service.rb', line 1041 def currency @currency end |
#customer ⇒ Object
The customer associated with this order.
1043 1044 1045 |
# File 'lib/stripe/services/order_service.rb', line 1043 def customer @customer end |
#description ⇒ Object
An arbitrary string attached to the object. Often useful for displaying to users.
1045 1046 1047 |
# File 'lib/stripe/services/order_service.rb', line 1045 def description @description end |
#discounts ⇒ Object
The coupons, promotion codes, and/or discounts to apply to the order.
1047 1048 1049 |
# File 'lib/stripe/services/order_service.rb', line 1047 def discounts @discounts end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
1049 1050 1051 |
# File 'lib/stripe/services/order_service.rb', line 1049 def @expand end |
#ip_address ⇒ Object
The IP address of the purchaser for this order.
1051 1052 1053 |
# File 'lib/stripe/services/order_service.rb', line 1051 def ip_address @ip_address end |
#line_items ⇒ Object
A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost.
1053 1054 1055 |
# File 'lib/stripe/services/order_service.rb', line 1053 def line_items @line_items end |
#metadata ⇒ Object
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`.
1055 1056 1057 |
# File 'lib/stripe/services/order_service.rb', line 1055 def @metadata end |
#payment ⇒ Object
Payment information associated with the order, including payment settings.
1057 1058 1059 |
# File 'lib/stripe/services/order_service.rb', line 1057 def payment @payment end |
#shipping_cost ⇒ Object
Settings for the customer cost of shipping for this order.
1059 1060 1061 |
# File 'lib/stripe/services/order_service.rb', line 1059 def shipping_cost @shipping_cost end |
#shipping_details ⇒ Object
Shipping details for the order.
1061 1062 1063 |
# File 'lib/stripe/services/order_service.rb', line 1061 def shipping_details @shipping_details end |
#tax_details ⇒ Object
Additional tax details about the purchaser to be used for this order.
1063 1064 1065 |
# File 'lib/stripe/services/order_service.rb', line 1063 def tax_details @tax_details end |