Class: Stripe::QuoteUpdateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/params/quote_update_params.rb

Defined Under Namespace

Classes: AutomaticTax, Discount, InvoiceSettings, Line, LineItem, SubscriptionData, SubscriptionDataOverride, TransferData

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, new, #to_h

Constructor Details

#initialize(allow_backdated_lines: nil, application_fee_amount: nil, application_fee_percent: nil, automatic_tax: nil, collection_method: nil, customer: nil, customer_account: nil, default_tax_rates: nil, description: nil, discounts: nil, expand: nil, expires_at: nil, footer: nil, header: nil, invoice_settings: nil, line_items: nil, lines: nil, metadata: nil, on_behalf_of: nil, subscription_data: nil, subscription_data_overrides: nil, transfer_data: nil) ⇒ QuoteUpdateParams

Returns a new instance of QuoteUpdateParams.



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
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
# File 'lib/stripe/params/quote_update_params.rb', line 1069

def initialize(
  allow_backdated_lines: nil,
  application_fee_amount: nil,
  application_fee_percent: nil,
  automatic_tax: nil,
  collection_method: nil,
  customer: nil,
  customer_account: nil,
  default_tax_rates: nil,
  description: nil,
  discounts: nil,
  expand: nil,
  expires_at: nil,
  footer: nil,
  header: nil,
  invoice_settings: nil,
  line_items: nil,
  lines: nil,
  metadata: nil,
  on_behalf_of: nil,
  subscription_data: nil,
  subscription_data_overrides: nil,
  transfer_data: nil
)
  @allow_backdated_lines = allow_backdated_lines
  @application_fee_amount = application_fee_amount
  @application_fee_percent = application_fee_percent
  @automatic_tax = automatic_tax
  @collection_method = collection_method
  @customer = customer
  @customer_account = 
  @default_tax_rates = default_tax_rates
  @description = description
  @discounts = discounts
  @expand = expand
  @expires_at = expires_at
  @footer = footer
  @header = header
  @invoice_settings = invoice_settings
  @line_items = line_items
  @lines = lines
  @metadata = 
  @on_behalf_of = on_behalf_of
  @subscription_data = subscription_data
  @subscription_data_overrides = subscription_data_overrides
  @transfer_data = transfer_data
end

Instance Attribute Details

#allow_backdated_linesObject

Set to true to allow quote lines to have starts_at in the past if collection is paused between starts_at and now.



1025
1026
1027
# File 'lib/stripe/params/quote_update_params.rb', line 1025

def allow_backdated_lines
  @allow_backdated_lines
end

#application_fee_amountObject

The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.



1027
1028
1029
# File 'lib/stripe/params/quote_update_params.rb', line 1027

def application_fee_amount
  @application_fee_amount
end

#application_fee_percentObject

A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.



1029
1030
1031
# File 'lib/stripe/params/quote_update_params.rb', line 1029

def application_fee_percent
  @application_fee_percent
end

#automatic_taxObject

Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.



1031
1032
1033
# File 'lib/stripe/params/quote_update_params.rb', line 1031

def automatic_tax
  @automatic_tax
end

#collection_methodObject

Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as active. Defaults to charge_automatically.



1033
1034
1035
# File 'lib/stripe/params/quote_update_params.rb', line 1033

def collection_method
  @collection_method
end

#customerObject

The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.



1035
1036
1037
# File 'lib/stripe/params/quote_update_params.rb', line 1035

def customer
  @customer
end

#customer_accountObject

The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.



1037
1038
1039
# File 'lib/stripe/params/quote_update_params.rb', line 1037

def 
  @customer_account
end

#default_tax_ratesObject

The tax rates that will apply to any line item that does not have tax_rates set.



1039
1040
1041
# File 'lib/stripe/params/quote_update_params.rb', line 1039

def default_tax_rates
  @default_tax_rates
end

#descriptionObject

A description that will be displayed on the quote PDF.



1041
1042
1043
# File 'lib/stripe/params/quote_update_params.rb', line 1041

def description
  @description
end

#discountsObject

The discounts applied to the quote.



1043
1044
1045
# File 'lib/stripe/params/quote_update_params.rb', line 1043

def discounts
  @discounts
end

#expandObject

Specifies which fields in the response should be expanded.



1045
1046
1047
# File 'lib/stripe/params/quote_update_params.rb', line 1045

def expand
  @expand
end

#expires_atObject

A future timestamp on which the quote will be canceled if in open or draft status. Measured in seconds since the Unix epoch.



1047
1048
1049
# File 'lib/stripe/params/quote_update_params.rb', line 1047

def expires_at
  @expires_at
end

A footer that will be displayed on the quote PDF.



1049
1050
1051
# File 'lib/stripe/params/quote_update_params.rb', line 1049

def footer
  @footer
end

#headerObject

A header that will be displayed on the quote PDF.



1051
1052
1053
# File 'lib/stripe/params/quote_update_params.rb', line 1051

def header
  @header
end

#invoice_settingsObject

All invoices will be billed using the specified settings.



1053
1054
1055
# File 'lib/stripe/params/quote_update_params.rb', line 1053

def invoice_settings
  @invoice_settings
end

#line_itemsObject

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



1055
1056
1057
# File 'lib/stripe/params/quote_update_params.rb', line 1055

def line_items
  @line_items
end

#linesObject

A list of quote lines on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.



1057
1058
1059
# File 'lib/stripe/params/quote_update_params.rb', line 1057

def lines
  @lines
end

#metadataObject

Set of key-value pairs 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.



1059
1060
1061
# File 'lib/stripe/params/quote_update_params.rb', line 1059

def 
  @metadata
end

#on_behalf_ofObject

The account on behalf of which to charge.



1061
1062
1063
# File 'lib/stripe/params/quote_update_params.rb', line 1061

def on_behalf_of
  @on_behalf_of
end

#subscription_dataObject

When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if subscription_data[effective_date] is present and in the future, otherwise a subscription is created.



1063
1064
1065
# File 'lib/stripe/params/quote_update_params.rb', line 1063

def subscription_data
  @subscription_data
end

#subscription_data_overridesObject

List representing overrides for subscription_data configurations for specific subscription schedules.



1065
1066
1067
# File 'lib/stripe/params/quote_update_params.rb', line 1065

def subscription_data_overrides
  @subscription_data_overrides
end

#transfer_dataObject

The data with which to automatically create a Transfer for each of the invoices.



1067
1068
1069
# File 'lib/stripe/params/quote_update_params.rb', line 1067

def transfer_data
  @transfer_data
end

Class Method Details

.field_encodingsObject



1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
# File 'lib/stripe/params/quote_update_params.rb', line 1117

def self.field_encodings
  @field_encodings = {
    line_items: {
      kind: :array,
      element: {
        kind: :object,
        fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } },
      },
    },
  }
end