Class: NovaposhtaApi::Resources::CounterpartyResource
Instance Attribute Summary
#http
Instance Method Summary
collapse
#initialize, #request
Instance Method Details
#addresses(ref) ⇒ Object
18
19
20
21
22
|
# File 'lib/novaposhta_api/resources/counterparty_resource.rb', line 18
def addresses(ref)
response = request('Counterparty/getCounterpartyAddresses', Ref: ref)
NovaposhtaApi::Models::CounterpartyAddress.(response)
end
|
24
25
26
27
28
|
# File 'lib/novaposhta_api/resources/counterparty_resource.rb', line 24
def contacts(ref)
response = request('Counterparty/getCounterpartyContactPersons', Ref: ref)
NovaposhtaApi::Models::ContactPerson.(response)
end
|
#create(params = {}) ⇒ Object
6
7
8
9
10
|
# File 'lib/novaposhta_api/resources/counterparty_resource.rb', line 6
def create(params = {})
response = request('Counterparty/save', params)
NovaposhtaApi::Models::Counterparty.(response)
end
|
#senders ⇒ Object
12
13
14
15
16
|
# File 'lib/novaposhta_api/resources/counterparty_resource.rb', line 12
def senders
response = request('Counterparty/getCounterparties', CounterpartyProperty: 'Sender')
NovaposhtaApi::Models::Counterparty.(response)
end
|