Class: Stripe::Margin::CreateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Margin::CreateParams
- Defined in:
- lib/stripe/resources/margin.rb
Instance Attribute Summary collapse
-
#active ⇒ Object
Whether the margin can be applied to invoices, invoice items, or invoice line items or not.
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#metadata ⇒ Object
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#name ⇒ Object
Name of the margin, which is displayed to customers, such as on invoices.
-
#percent_off ⇒ Object
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.
Instance Method Summary collapse
-
#initialize(active: nil, expand: nil, metadata: nil, name: nil, percent_off: nil) ⇒ CreateParams
constructor
A new instance of CreateParams.
Methods inherited from RequestParams
Constructor Details
#initialize(active: nil, expand: nil, metadata: nil, name: nil, percent_off: nil) ⇒ CreateParams
Returns a new instance of CreateParams.
58 59 60 61 62 63 64 |
# File 'lib/stripe/resources/margin.rb', line 58 def initialize(active: nil, expand: nil, metadata: nil, name: nil, percent_off: nil) @active = active @expand = @metadata = @name = name @percent_off = percent_off end |
Instance Attribute Details
#active ⇒ Object
Whether the margin can be applied to invoices, invoice items, or invoice line items or not. Defaults to ‘true`.
44 45 46 |
# File 'lib/stripe/resources/margin.rb', line 44 def active @active end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
47 48 49 |
# File 'lib/stripe/resources/margin.rb', line 47 def @expand end |
#metadata ⇒ Object
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`.
50 51 52 |
# File 'lib/stripe/resources/margin.rb', line 50 def @metadata end |
#name ⇒ Object
Name of the margin, which is displayed to customers, such as on invoices.
53 54 55 |
# File 'lib/stripe/resources/margin.rb', line 53 def name @name end |
#percent_off ⇒ Object
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.
56 57 58 |
# File 'lib/stripe/resources/margin.rb', line 56 def percent_off @percent_off end |