Class: Pike13::API::V2::Front::FormOfPayment

Inherits:
Base
  • Object
show all
Defined in:
lib/pike13/api/v2/front/form_of_payment.rb

Class Method Summary collapse

Methods inherited from Base

client, configure

Class Method Details

.all(person_id:, **params) ⇒ Object

GET /front/people/:person_id/form_of_payments



10
11
12
# File 'lib/pike13/api/v2/front/form_of_payment.rb', line 10

def all(person_id:, **params)
  client.get("front/people/#{person_id}/form_of_payments", params)
end

.create(person_id:, attributes:) ⇒ Object

POST /front/people/:person_id/form_of_payments



25
26
27
# File 'lib/pike13/api/v2/front/form_of_payment.rb', line 25

def create(person_id:, attributes:)
  client.post("front/people/#{person_id}/form_of_payments", { form_of_payment: attributes })
end

.destroy(person_id:, id:) ⇒ Object

DELETE /front/people/:person_id/form_of_payments/:id



35
36
37
# File 'lib/pike13/api/v2/front/form_of_payment.rb', line 35

def destroy(person_id:, id:)
  client.delete("front/people/#{person_id}/form_of_payments/#{id}")
end

.find(person_id:, id:) ⇒ Object

GET /front/people/:person_id/form_of_payments/:id



15
16
17
# File 'lib/pike13/api/v2/front/form_of_payment.rb', line 15

def find(person_id:, id:)
  client.get("front/people/#{person_id}/form_of_payments/#{id}")
end

.find_me(id:) ⇒ Object

GET /front/people/me/form_of_payments/:id



20
21
22
# File 'lib/pike13/api/v2/front/form_of_payment.rb', line 20

def find_me(id:)
  client.get("front/people/me/form_of_payments/#{id}")
end

.update(person_id:, id:, attributes:) ⇒ Object

PUT /front/people/:person_id/form_of_payments/:id



30
31
32
# File 'lib/pike13/api/v2/front/form_of_payment.rb', line 30

def update(person_id:, id:, attributes:)
  client.put("front/people/#{person_id}/form_of_payments/#{id}", { form_of_payment: attributes })
end