Class: OpenApiSDK::Models::Shared::DiscountCodeWebhookEventData

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/open_api_sdk/models/shared/discountcodewebhookevent_data.rb

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(id:, code:, partner_id:, link_id:, discount: nil, disabled_at: nil) ⇒ DiscountCodeWebhookEventData

Returns a new instance of DiscountCodeWebhookEventData.



31
32
33
34
35
36
37
38
# File 'lib/open_api_sdk/models/shared/discountcodewebhookevent_data.rb', line 31

def initialize(id:, code:, partner_id:, link_id:, discount: nil, disabled_at: nil)
  @id = id
  @code = code
  @partner_id = partner_id
  @link_id = link_id
  @discount = discount
  @disabled_at = disabled_at
end

Instance Method Details

#==(other) ⇒ Object



41
42
43
44
45
46
47
48
49
50
# File 'lib/open_api_sdk/models/shared/discountcodewebhookevent_data.rb', line 41

def ==(other)
  return false unless other.is_a? self.class
  return false unless @id == other.id
  return false unless @code == other.code
  return false unless @partner_id == other.partner_id
  return false unless @link_id == other.link_id
  return false unless @discount == other.discount
  return false unless @disabled_at == other.disabled_at
  true
end