Class: SelfPay::BilletApi

Inherits:
Object
  • Object
show all
Defined in:
lib/SelfPay/billet_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ BilletApi

Returns a new instance of BilletApi.



5
6
7
# File 'lib/SelfPay/billet_api.rb', line 5

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



3
4
5
# File 'lib/SelfPay/billet_api.rb', line 3

def client
  @client
end

Instance Method Details

#create(billet) ⇒ Object



9
10
11
# File 'lib/SelfPay/billet_api.rb', line 9

def create(billet)
  Resource::Billet.new client, client.post("/Billet", billet)
end

#show(billet_id) ⇒ Object



13
14
15
# File 'lib/SelfPay/billet_api.rb', line 13

def show(billet_id)
  Resource::Billet.new client.get("Billet/#{billet_id}")
end