Module: PlentyClient::Accounting

Includes:
Endpoint, Request
Defined in:
lib/plenty_client/accounting.rb

Constant Summary collapse

LIST_VAT_OF_LOCATION =
'/vat/locations/{locationId}'.freeze
LIST_VAT_OF_COUNTRY =
'/vat/locations/{locationId}/countries/{countryId}'.freeze
LIST_VAT_CONFIGURATIONS =
'/vat'.freeze
LIST_VAT_STANDARD =
'/vat/standard'.freeze

Class Method Summary collapse

Methods included from Request

included

Methods included from Endpoint

included

Class Method Details

.list(headers = {}, &block) ⇒ Object



12
13
14
# File 'lib/plenty_client/accounting.rb', line 12

def list(headers = {}, &block)
  get(build_endpoint(LIST_VAT_CONFIGURATIONS), headers, &block)
end

.list_for_country(location_id, country_id, headers = {}, &block) ⇒ Object



16
17
18
19
20
# File 'lib/plenty_client/accounting.rb', line 16

def list_for_country(location_id, country_id, headers = {}, &block)
  get(build_endpoint(LIST_VAT_OF_COUNTRY,
                     location: location_id,
                     country: country_id), headers, &block)
end

.list_for_location(location_id, headers = {}, &block) ⇒ Object



22
23
24
25
# File 'lib/plenty_client/accounting.rb', line 22

def list_for_location(location_id, headers = {}, &block)
  get(build_endpoint(LIST_VAT_OF_LOCATION,
                     location: location_id), headers, &block)
end

.standard(headers = {}, &block) ⇒ Object



27
28
29
# File 'lib/plenty_client/accounting.rb', line 27

def standard(headers = {}, &block)
  get(build_endpoint(LIST_VAT_STANDARD), headers, &block)
end