Class: Believe::Models::TicketSaleCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/believe/models/ticket_sale_create_params.rb

Overview

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(buyer_name:, currency:, discount:, match_id:, purchase_method:, quantity:, subtotal:, tax:, total:, unit_price:, buyer_email: nil, coupon_code: nil, request_options: {}) ⇒ Object

Parameters:

  • buyer_name (String)

    Name of the ticket buyer

  • currency (String)

    Currency code (GBP, USD, or EUR)

  • discount (String)

    Discount amount applied from coupon

  • 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)

  • buyer_email (String, nil) (defaults to: nil)

    Email of the ticket buyer

  • coupon_code (String, nil) (defaults to: nil)

    Coupon code applied, if any

  • request_options (::Believe::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/believe/models/ticket_sale_create_params.rb', line 82

Instance Attribute Details

#buyer_emailString?

Email of the ticket buyer

Returns:

  • (String, nil)


74
# File 'lib/believe/models/ticket_sale_create_params.rb', line 74

optional :buyer_email, String, nil?: true

#buyer_nameString

Name of the ticket buyer

Returns:

  • (String)


14
# File 'lib/believe/models/ticket_sale_create_params.rb', line 14

required :buyer_name, String

#coupon_codeString?

Coupon code applied, if any

Returns:

  • (String, nil)


80
# File 'lib/believe/models/ticket_sale_create_params.rb', line 80

optional :coupon_code, String, nil?: true

#currencyString

Currency code (GBP, USD, or EUR)

Returns:

  • (String)


20
# File 'lib/believe/models/ticket_sale_create_params.rb', line 20

required :currency, String

#discountString

Discount amount applied from coupon

Returns:

  • (String)


26
# File 'lib/believe/models/ticket_sale_create_params.rb', line 26

required :discount, String

#match_idString

ID of the match

Returns:

  • (String)


32
# File 'lib/believe/models/ticket_sale_create_params.rb', line 32

required :match_id, String

#purchase_methodSymbol, ::Believe::Models::PurchaseMethod

How the ticket was purchased



38
# File 'lib/believe/models/ticket_sale_create_params.rb', line 38

required :purchase_method, enum: -> { ::Believe::PurchaseMethod }

#quantityInteger

Number of tickets purchased

Returns:

  • (Integer)


44
# File 'lib/believe/models/ticket_sale_create_params.rb', line 44

required :quantity, Integer

#subtotalString

Subtotal before discount and tax (unit_price * quantity)

Returns:

  • (String)


50
# File 'lib/believe/models/ticket_sale_create_params.rb', line 50

required :subtotal, String

#taxString

Tax amount (20% UK VAT on discounted subtotal)

Returns:

  • (String)


56
# File 'lib/believe/models/ticket_sale_create_params.rb', line 56

required :tax, String

#totalString

Final total (subtotal - discount + tax)

Returns:

  • (String)


62
# File 'lib/believe/models/ticket_sale_create_params.rb', line 62

required :total, String

#unit_priceString

Price per ticket (decimal string)

Returns:

  • (String)


68
# File 'lib/believe/models/ticket_sale_create_params.rb', line 68

required :unit_price, String