class Rbvore::TicketServiceCharge

Attributes

comment[RW]
id[RW]
name[RW]
price[RW]

Public Class Methods

create(location_id:, ticket_id:, name:, amount:, api_key: nil) click to toggle source
# File lib/rbvore/ticket_service_charge.rb, line 11
def self.create(location_id:, ticket_id:, name:, amount:, api_key: nil)
  response = api.request(
    :post,
    API.endpoint(Location, location_id, Ticket, ticket_id, "service_charges"),
    body: [{ service_charge: name, amount: amount }],
    api_key: api_key,
  )
  raise response.error unless response.success?

  TicketServiceCharge.new(response.json_body)
end
new(hash) click to toggle source
# File lib/rbvore/ticket_service_charge.rb, line 7
def initialize(hash)
  set_attributes(hash)
end