Class: Stripe::QuoteCreateParams::Line::Action

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

Defined Under Namespace

Classes: AddDiscount, AddItem, RemoveDiscount, RemoveItem, SetDiscount, SetItem

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h

Constructor Details

#initialize(add_discount: nil, add_item: nil, add_metadata: nil, remove_discount: nil, remove_item: nil, remove_metadata: nil, set_discounts: nil, set_items: nil, set_metadata: nil, type: nil) ⇒ Action

Returns a new instance of Action.



408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
# File 'lib/stripe/params/quote_create_params.rb', line 408

def initialize(
  add_discount: nil,
  add_item: nil,
  add_metadata: nil,
  remove_discount: nil,
  remove_item: nil,
  remove_metadata: nil,
  set_discounts: nil,
  set_items: nil,
  set_metadata: nil,
  type: nil
)
  @add_discount = add_discount
  @add_item = add_item
  @add_metadata = 
  @remove_discount = remove_discount
  @remove_item = remove_item
  @remove_metadata = 
  @set_discounts = set_discounts
  @set_items = set_items
  @set_metadata = 
  @type = type
end

Instance Attribute Details

#add_discountObject

Details for the add_discount type.



388
389
390
# File 'lib/stripe/params/quote_create_params.rb', line 388

def add_discount
  @add_discount
end

#add_itemObject

Details for the add_item type.



390
391
392
# File 'lib/stripe/params/quote_create_params.rb', line 390

def add_item
  @add_item
end

#add_metadataObject

Details for the add_metadata type: specify a hash of key-value pairs.



392
393
394
# File 'lib/stripe/params/quote_create_params.rb', line 392

def 
  @add_metadata
end

#remove_discountObject

Details for the remove_discount type.



394
395
396
# File 'lib/stripe/params/quote_create_params.rb', line 394

def remove_discount
  @remove_discount
end

#remove_itemObject

Details for the remove_item type.



396
397
398
# File 'lib/stripe/params/quote_create_params.rb', line 396

def remove_item
  @remove_item
end

#remove_metadataObject

Details for the remove_metadata type: specify an array of metadata keys.



398
399
400
# File 'lib/stripe/params/quote_create_params.rb', line 398

def 
  @remove_metadata
end

#set_discountsObject

Details for the set_discounts type.



400
401
402
# File 'lib/stripe/params/quote_create_params.rb', line 400

def set_discounts
  @set_discounts
end

#set_itemsObject

Details for the set_items type.



402
403
404
# File 'lib/stripe/params/quote_create_params.rb', line 402

def set_items
  @set_items
end

#set_metadataObject

Details for the set_metadata type: specify an array of key-value pairs.



404
405
406
# File 'lib/stripe/params/quote_create_params.rb', line 404

def 
  @set_metadata
end

#typeObject

The type of action the quote line performs.



406
407
408
# File 'lib/stripe/params/quote_create_params.rb', line 406

def type
  @type
end