Class: Believe::Models::TicketSale
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Believe::Models::TicketSale
- Defined in:
- lib/believe/models/ticket_sale.rb
Overview
Instance Attribute Summary collapse
-
#buyer_email ⇒ String?
Email of the ticket buyer.
-
#buyer_name ⇒ String
Name of the ticket buyer.
-
#coupon_code ⇒ String?
Coupon code applied, if any.
-
#currency ⇒ String
Currency code (GBP, USD, or EUR).
-
#discount ⇒ String
Discount amount applied from coupon.
-
#id ⇒ String
Unique identifier.
-
#match_id ⇒ String
ID of the match.
-
#purchase_method ⇒ Symbol, ::Believe::Models::PurchaseMethod
How the ticket was purchased.
-
#quantity ⇒ Integer
Number of tickets purchased.
-
#subtotal ⇒ String
Subtotal before discount and tax (unit_price * quantity).
-
#tax ⇒ String
Tax amount (20% UK VAT on discounted subtotal).
-
#total ⇒ String
Final total (subtotal - discount + tax).
-
#unit_price ⇒ String
Price per ticket (decimal string).
Instance Method Summary collapse
-
#initialize(id:, buyer_name:, currency:, discount:, match_id:, purchase_method:, quantity:, subtotal:, tax:, total:, unit_price:, buyer_email: nil, coupon_code: nil) ⇒ Object
constructor
Full ticket sale model with ID.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id:, buyer_name:, currency:, discount:, match_id:, purchase_method:, quantity:, subtotal:, tax:, total:, unit_price:, buyer_email: nil, coupon_code: nil) ⇒ Object
Full ticket sale model with ID.
|
|
# File 'lib/believe/models/ticket_sale.rb', line 85
|
Instance Attribute Details
#buyer_email ⇒ String?
Email of the ticket buyer
77 |
# File 'lib/believe/models/ticket_sale.rb', line 77 optional :buyer_email, String, nil?: true |
#buyer_name ⇒ String
Name of the ticket buyer
17 |
# File 'lib/believe/models/ticket_sale.rb', line 17 required :buyer_name, String |
#coupon_code ⇒ String?
Coupon code applied, if any
83 |
# File 'lib/believe/models/ticket_sale.rb', line 83 optional :coupon_code, String, nil?: true |
#currency ⇒ String
Currency code (GBP, USD, or EUR)
23 |
# File 'lib/believe/models/ticket_sale.rb', line 23 required :currency, String |
#discount ⇒ String
Discount amount applied from coupon
29 |
# File 'lib/believe/models/ticket_sale.rb', line 29 required :discount, String |
#id ⇒ String
Unique identifier
11 |
# File 'lib/believe/models/ticket_sale.rb', line 11 required :id, String |
#match_id ⇒ String
ID of the match
35 |
# File 'lib/believe/models/ticket_sale.rb', line 35 required :match_id, String |
#purchase_method ⇒ Symbol, ::Believe::Models::PurchaseMethod
How the ticket was purchased
41 |
# File 'lib/believe/models/ticket_sale.rb', line 41 required :purchase_method, enum: -> { ::Believe::PurchaseMethod } |
#quantity ⇒ Integer
Number of tickets purchased
47 |
# File 'lib/believe/models/ticket_sale.rb', line 47 required :quantity, Integer |
#subtotal ⇒ String
Subtotal before discount and tax (unit_price * quantity)
53 |
# File 'lib/believe/models/ticket_sale.rb', line 53 required :subtotal, String |
#tax ⇒ String
Tax amount (20% UK VAT on discounted subtotal)
59 |
# File 'lib/believe/models/ticket_sale.rb', line 59 required :tax, String |
#total ⇒ String
Final total (subtotal - discount + tax)
65 |
# File 'lib/believe/models/ticket_sale.rb', line 65 required :total, String |
#unit_price ⇒ String
Price per ticket (decimal string)
71 |
# File 'lib/believe/models/ticket_sale.rb', line 71 required :unit_price, String |