Class: Stripe::MarginService::CreateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/services/margin_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(active: nil, expand: nil, metadata: nil, name: nil, percent_off: nil) ⇒ CreateParams

Returns a new instance of CreateParams.



39
40
41
42
43
44
45
# File 'lib/stripe/services/margin_service.rb', line 39

def initialize(active: nil, expand: nil, metadata: nil, name: nil, percent_off: nil)
  @active = active
  @expand = expand
  @metadata = 
  @name = name
  @percent_off = percent_off
end

Instance Attribute Details

#activeObject

Whether the margin can be applied to invoices, invoice items, or invoice line items or not. Defaults to ‘true`.



29
30
31
# File 'lib/stripe/services/margin_service.rb', line 29

def active
  @active
end

#expandObject

Specifies which fields in the response should be expanded.



31
32
33
# File 'lib/stripe/services/margin_service.rb', line 31

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



33
34
35
# File 'lib/stripe/services/margin_service.rb', line 33

def 
  @metadata
end

#nameObject

Name of the margin, which is displayed to customers, such as on invoices.



35
36
37
# File 'lib/stripe/services/margin_service.rb', line 35

def name
  @name
end

#percent_offObject

Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied.



37
38
39
# File 'lib/stripe/services/margin_service.rb', line 37

def percent_off
  @percent_off
end