Class: Stripe::QuoteLine::Action::SetDiscount

Inherits:
StripeObject
  • Object
show all
Defined in:
lib/stripe/resources/quote_line.rb

Defined Under Namespace

Classes: DiscountEnd, Settings

Constant Summary

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods inherited from StripeObject

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#couponObject (readonly)

ID of the coupon to create a new discount for.



331
332
333
# File 'lib/stripe/resources/quote_line.rb', line 331

def coupon
  @coupon
end

#discountObject (readonly)

ID of an existing discount on the object (or one of its ancestors) to reuse.



333
334
335
# File 'lib/stripe/resources/quote_line.rb', line 333

def discount
  @discount
end

#discount_endObject (readonly)

Details to determine how long the discount should be applied for.



335
336
337
# File 'lib/stripe/resources/quote_line.rb', line 335

def discount_end
  @discount_end
end

#promotion_codeObject (readonly)

ID of the promotion code to create a new discount for.



337
338
339
# File 'lib/stripe/resources/quote_line.rb', line 337

def promotion_code
  @promotion_code
end

#settingsObject (readonly)

Attribute for field settings



339
340
341
# File 'lib/stripe/resources/quote_line.rb', line 339

def settings
  @settings
end

Class Method Details

.field_remappingsObject



345
346
347
# File 'lib/stripe/resources/quote_line.rb', line 345

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



341
342
343
# File 'lib/stripe/resources/quote_line.rb', line 341

def self.inner_class_types
  @inner_class_types = { discount_end: DiscountEnd, settings: Settings }
end