Class: PlentyClient::Payment::Contact

Inherits:
Object
  • Object
show all
Includes:
Endpoint, Request
Defined in:
lib/plenty_client/payment/contact.rb

Constant Summary collapse

CREATE_PAYMENT_CONTACT_RELATION =
'/payment/{paymentId}/contact/{contactId}'
DELETE_CONTACTS_PAYMENT =
'/payment/{paymentId}/contact'

Class Method Summary collapse

Methods included from Request

included

Methods included from Endpoint

included

Class Method Details

.create(payment_id, contact_id, body = {}) ⇒ Object



13
14
15
# File 'lib/plenty_client/payment/contact.rb', line 13

def create(payment_id, contact_id, body = {})
  post(build_endpoint(CREATE_PAYMENT_CONTACT_RELATION, payment: payment_id, contact: contact_id), body)
end

.destroy(payment_id, body = {}) ⇒ Object



17
18
19
# File 'lib/plenty_client/payment/contact.rb', line 17

def destroy(payment_id, body = {})
  delete(build_endpoint(DELETE_CONTACTS_PAYMENT, payment: payment_id), body)
end