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.



604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
# File 'lib/stripe/params/quote_create_params.rb', line 604

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.



584
585
586
# File 'lib/stripe/params/quote_create_params.rb', line 584

def add_discount
  @add_discount
end

#add_itemObject

Details for the add_item type.



586
587
588
# File 'lib/stripe/params/quote_create_params.rb', line 586

def add_item
  @add_item
end

#add_metadataObject

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



588
589
590
# File 'lib/stripe/params/quote_create_params.rb', line 588

def 
  @add_metadata
end

#remove_discountObject

Details for the remove_discount type.



590
591
592
# File 'lib/stripe/params/quote_create_params.rb', line 590

def remove_discount
  @remove_discount
end

#remove_itemObject

Details for the remove_item type.



592
593
594
# File 'lib/stripe/params/quote_create_params.rb', line 592

def remove_item
  @remove_item
end

#remove_metadataObject

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



594
595
596
# File 'lib/stripe/params/quote_create_params.rb', line 594

def 
  @remove_metadata
end

#set_discountsObject

Details for the set_discounts type.



596
597
598
# File 'lib/stripe/params/quote_create_params.rb', line 596

def set_discounts
  @set_discounts
end

#set_itemsObject

Details for the set_items type.



598
599
600
# File 'lib/stripe/params/quote_create_params.rb', line 598

def set_items
  @set_items
end

#set_metadataObject

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



600
601
602
# File 'lib/stripe/params/quote_create_params.rb', line 600

def 
  @set_metadata
end

#typeObject

The type of action the quote line performs.



602
603
604
# File 'lib/stripe/params/quote_create_params.rb', line 602

def type
  @type
end