Class: Stripe::Invoice::UpdateParams

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

Defined Under Namespace

Classes: AutomaticTax, CustomField, Discount, Issuer, PaymentSettings, Rendering, ShippingCost, ShippingDetails, TransferData

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(account_tax_ids: nil, application_fee_amount: nil, auto_advance: nil, automatic_tax: nil, automatically_finalizes_at: nil, collection_method: nil, custom_fields: nil, days_until_due: nil, default_payment_method: nil, default_source: nil, default_tax_rates: nil, description: nil, discounts: nil, due_date: nil, effective_at: nil, expand: nil, footer: nil, issuer: nil, metadata: nil, number: nil, on_behalf_of: nil, payment_settings: nil, rendering: nil, shipping_cost: nil, shipping_details: nil, statement_descriptor: nil, transfer_data: nil) ⇒ UpdateParams

Returns a new instance of UpdateParams.



954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
# File 'lib/stripe/resources/invoice.rb', line 954

def initialize(
  account_tax_ids: nil,
  application_fee_amount: nil,
  auto_advance: nil,
  automatic_tax: nil,
  automatically_finalizes_at: nil,
  collection_method: nil,
  custom_fields: nil,
  days_until_due: nil,
  default_payment_method: nil,
  default_source: nil,
  default_tax_rates: nil,
  description: nil,
  discounts: nil,
  due_date: nil,
  effective_at: nil,
  expand: nil,
  footer: nil,
  issuer: nil,
  metadata: nil,
  number: nil,
  on_behalf_of: nil,
  payment_settings: nil,
  rendering: nil,
  shipping_cost: nil,
  shipping_details: nil,
  statement_descriptor: nil,
  transfer_data: nil
)
  @account_tax_ids = 
  @application_fee_amount = application_fee_amount
  @auto_advance = auto_advance
  @automatic_tax = automatic_tax
  @automatically_finalizes_at = automatically_finalizes_at
  @collection_method = collection_method
  @custom_fields = custom_fields
  @days_until_due = days_until_due
  @default_payment_method = default_payment_method
  @default_source = default_source
  @default_tax_rates = default_tax_rates
  @description = description
  @discounts = discounts
  @due_date = due_date
  @effective_at = effective_at
  @expand = expand
  @footer = footer
  @issuer = issuer
  @metadata = 
  @number = number
  @on_behalf_of = on_behalf_of
  @payment_settings = payment_settings
  @rendering = rendering
  @shipping_cost = shipping_cost
  @shipping_details = shipping_details
  @statement_descriptor = statement_descriptor
  @transfer_data = transfer_data
end

Instance Attribute Details

#account_tax_idsObject

The account tax IDs associated with the invoice. Only editable when the invoice is a draft.



900
901
902
# File 'lib/stripe/resources/invoice.rb', line 900

def 
  @account_tax_ids
end

#application_fee_amountObject

A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](stripe.com/docs/billing/invoices/connect#collecting-fees).



902
903
904
# File 'lib/stripe/resources/invoice.rb', line 902

def application_fee_amount
  @application_fee_amount
end

#auto_advanceObject

Controls whether Stripe performs [automatic collection](stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.



904
905
906
# File 'lib/stripe/resources/invoice.rb', line 904

def auto_advance
  @auto_advance
end

#automatic_taxObject

Settings for automatic tax lookup for this invoice.



906
907
908
# File 'lib/stripe/resources/invoice.rb', line 906

def automatic_tax
  @automatic_tax
end

#automatically_finalizes_atObject

The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set ‘auto_advance` to false.



908
909
910
# File 'lib/stripe/resources/invoice.rb', line 908

def automatically_finalizes_at
  @automatically_finalizes_at
end

#collection_methodObject

Either ‘charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices.



910
911
912
# File 'lib/stripe/resources/invoice.rb', line 910

def collection_method
  @collection_method
end

#custom_fieldsObject

A list of up to 4 custom fields to be displayed on the invoice. If a value for ‘custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields.



912
913
914
# File 'lib/stripe/resources/invoice.rb', line 912

def custom_fields
  @custom_fields
end

#days_until_dueObject

The number of days from which the invoice is created until it is due. Only valid for invoices where ‘collection_method=send_invoice`. This field can only be updated on `draft` invoices.



914
915
916
# File 'lib/stripe/resources/invoice.rb', line 914

def days_until_due
  @days_until_due
end

#default_payment_methodObject

ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription’s default payment method, if any, or to the default payment method in the customer’s invoice settings.



916
917
918
# File 'lib/stripe/resources/invoice.rb', line 916

def default_payment_method
  @default_payment_method
end

#default_sourceObject

ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription’s default source, if any, or to the customer’s default source.



918
919
920
# File 'lib/stripe/resources/invoice.rb', line 918

def default_source
  @default_source
end

#default_tax_ratesObject

The tax rates that will apply to any line item that does not have ‘tax_rates` set. Pass an empty string to remove previously-defined tax rates.



920
921
922
# File 'lib/stripe/resources/invoice.rb', line 920

def default_tax_rates
  @default_tax_rates
end

#descriptionObject

An arbitrary string attached to the object. Often useful for displaying to users. Referenced as ‘memo’ in the Dashboard.



922
923
924
# File 'lib/stripe/resources/invoice.rb', line 922

def description
  @description
end

#discountsObject

The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts.



924
925
926
# File 'lib/stripe/resources/invoice.rb', line 924

def discounts
  @discounts
end

#due_dateObject

The date on which payment for this invoice is due. Only valid for invoices where ‘collection_method=send_invoice`. This field can only be updated on `draft` invoices.



926
927
928
# File 'lib/stripe/resources/invoice.rb', line 926

def due_date
  @due_date
end

#effective_atObject

The date when this invoice is in effect. Same as ‘finalized_at` unless overwritten. When defined, this value replaces the system-generated ’Date of issue’ printed on the invoice PDF and receipt.



928
929
930
# File 'lib/stripe/resources/invoice.rb', line 928

def effective_at
  @effective_at
end

#expandObject

Specifies which fields in the response should be expanded.



930
931
932
# File 'lib/stripe/resources/invoice.rb', line 930

def expand
  @expand
end

Footer to be displayed on the invoice.



932
933
934
# File 'lib/stripe/resources/invoice.rb', line 932

def footer
  @footer
end

#issuerObject

The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.



934
935
936
# File 'lib/stripe/resources/invoice.rb', line 934

def issuer
  @issuer
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`.



936
937
938
# File 'lib/stripe/resources/invoice.rb', line 936

def 
  @metadata
end

#numberObject

Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.



938
939
940
# File 'lib/stripe/resources/invoice.rb', line 938

def number
  @number
end

#on_behalf_ofObject

The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](stripe.com/docs/billing/invoices/connect) documentation for details.



940
941
942
# File 'lib/stripe/resources/invoice.rb', line 940

def on_behalf_of
  @on_behalf_of
end

#payment_settingsObject

Configuration settings for the PaymentIntent that is generated when the invoice is finalized.



942
943
944
# File 'lib/stripe/resources/invoice.rb', line 942

def payment_settings
  @payment_settings
end

#renderingObject

The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.



944
945
946
# File 'lib/stripe/resources/invoice.rb', line 944

def rendering
  @rendering
end

#shipping_costObject

Settings for the cost of shipping for this invoice.



946
947
948
# File 'lib/stripe/resources/invoice.rb', line 946

def shipping_cost
  @shipping_cost
end

#shipping_detailsObject

Shipping details for the invoice. The Invoice PDF will use the ‘shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.



948
949
950
# File 'lib/stripe/resources/invoice.rb', line 948

def shipping_details
  @shipping_details
end

#statement_descriptorObject

Extra information about a charge for the customer’s credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default ‘statement_descriptor` will be set to the first subscription item’s product’s ‘statement_descriptor`.



950
951
952
# File 'lib/stripe/resources/invoice.rb', line 950

def statement_descriptor
  @statement_descriptor
end

#transfer_dataObject

If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice’s charge. This will be unset if you POST an empty value.



952
953
954
# File 'lib/stripe/resources/invoice.rb', line 952

def transfer_data
  @transfer_data
end