Class: Tazapay::Metadata

Inherits:
Client
  • Object
show all
Defined in:
lib/tazapay/metadata.rb

Overview

Metadata API

Instance Method Summary collapse

Methods inherited from Client

#handle_error, #interpret_response, #send_request

Instance Method Details

#collection_methods(buyer_country:, seller_country:, invoice_currency:, amount:) ⇒ Object



19
20
21
22
23
24
# File 'lib/tazapay/metadata.rb', line 19

def collection_methods(buyer_country:, seller_country:, invoice_currency:, amount:)
  path = "v1/metadata/collect?buyer_country=#{buyer_country}" \
         "&seller_country=#{seller_country}&invoice_currency=#{invoice_currency}" \
         "&amount=#{amount}"
  send_request(method: :get, path: path)
end

#country_config(country) ⇒ Object



9
10
11
12
# File 'lib/tazapay/metadata.rb', line 9

def country_config(country)
  path = "v1/metadata/countryconfig?country=#{country}"
  send_request(method: :get, path: path)
end

#disbursement_methods(buyer_country:, seller_country:, invoice_currency:, amount:) ⇒ Object



26
27
28
29
30
31
# File 'lib/tazapay/metadata.rb', line 26

def disbursement_methods(buyer_country:, seller_country:, invoice_currency:, amount:)
  path = "v1/metadata/disburse?buyer_country=#{buyer_country}" \
         "&seller_country=#{seller_country}&invoice_currency=#{invoice_currency}" \
         "&amount=#{amount}"
  send_request(method: :get, path: path)
end

#doc_upload_urlObject



33
34
35
36
# File 'lib/tazapay/metadata.rb', line 33

def doc_upload_url
  path = "/v1/metadata/doc/upload"
  send_request(method: :get, path: path)
end

#invoice_currency(buyer_country:, seller_country:) ⇒ Object



14
15
16
17
# File 'lib/tazapay/metadata.rb', line 14

def invoice_currency(buyer_country:, seller_country:)
  path = "v1/metadata/invoicecurrency?buyer_country=#{buyer_country}&seller_country=#{seller_country}"
  send_request(method: :get, path: path)
end

#kyb_doc(country) ⇒ Object



38
39
40
41
# File 'lib/tazapay/metadata.rb', line 38

def kyb_doc(country)
  path = "/v1/metadata/kyb/doc?country=#{country}"
  send_request(method: :get, path: path)
end

#milestone_schemeObject



43
44
45
46
# File 'lib/tazapay/metadata.rb', line 43

def milestone_scheme
  path = "v1/metadata/milestone/scheme"
  send_request(method: :get, path: path)
end