Class: Stripe::InvoiceAddLinesParams

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

Defined Under Namespace

Classes: Line

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(expand: nil, invoice_metadata: nil, lines: nil) ⇒ InvoiceAddLinesParams

Returns a new instance of InvoiceAddLinesParams.



287
288
289
290
291
# File 'lib/stripe/params/invoice_add_lines_params.rb', line 287

def initialize(expand: nil, invoice_metadata: nil, lines: nil)
  @expand = expand
  @invoice_metadata = 
  @lines = lines
end

Instance Attribute Details

#expandObject

Specifies which fields in the response should be expanded.



281
282
283
# File 'lib/stripe/params/invoice_add_lines_params.rb', line 281

def expand
  @expand
end

#invoice_metadataObject

Set of [key-value pairs](docs.stripe.com/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`.



283
284
285
# File 'lib/stripe/params/invoice_add_lines_params.rb', line 283

def 
  @invoice_metadata
end

#linesObject

The line items to add.



285
286
287
# File 'lib/stripe/params/invoice_add_lines_params.rb', line 285

def lines
  @lines
end

Class Method Details

.field_encodingsObject



293
294
295
296
297
298
299
300
301
302
303
304
305
306
# File 'lib/stripe/params/invoice_add_lines_params.rb', line 293

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