Module: VatInfo
- Defined in:
- lib/vat_info.rb,
lib/vat_info/query.rb,
lib/vat_info/utils.rb,
lib/vat_info/models.rb,
lib/vat_info/request.rb,
lib/vat_info/version.rb,
lib/vat_info/response.rb,
lib/vat_info/models/status.rb,
lib/vat_info/models/vat_payer.rb,
lib/vat_info/models/vat_payers.rb,
lib/vat_info/request/unreliable_payer.rb
Defined Under Namespace
Modules: Models, Utils Classes: Query, Request, Response, SchemaError
Constant Summary collapse
- VERSION =
'0.0.1'
Class Method Summary collapse
- .unreliable_payer(*vat_ids) ⇒ Object
- .unreliable_payer_extended ⇒ Object
- .unreliable_payer_list ⇒ Object
Class Method Details
.unreliable_payer(*vat_ids) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/vat_info.rb', line 9 def self.unreliable_payer(*vat_ids) request = VatInfo::Request::UnreliablePayer.new(*vat_ids).to_xml response = VatInfo::Query.call(request, :get_status_nespolehlivy_platce) if response.ok? status_raw = response.raw[:status_nespolehlivy_platce_response][:status] status = VatInfo::Models::Status.new(status_raw).data payers_raw = VatInfo::Utils.wrap_in_array(response.raw[:status_nespolehlivy_platce_response][:status_platce_dph]) payers = VatInfo::Models::VatPayers.new(payers_raw).data response.body = status.merge(payers) end response end |
.unreliable_payer_extended ⇒ Object
25 26 27 28 |
# File 'lib/vat_info.rb', line 25 def self.unreliable_payer_extended # :get_status_nespolehlivy_platce_rozsireny raise NotImplementedError end |
.unreliable_payer_list ⇒ Object
30 31 32 33 |
# File 'lib/vat_info.rb', line 30 def self.unreliable_payer_list # :get_seznam_nespolehlivy_platce raise NotImplementedError end |