Class: VertexClient::Payload::TaxArea
- Inherits:
-
Base
- Object
- Base
- VertexClient::Payload::TaxArea
show all
- Defined in:
- lib/vertex_client/payloads/tax_area.rb
Instance Attribute Summary
Attributes inherited from Base
#params
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #transform
Instance Method Details
#body ⇒ Object
9
10
11
12
13
14
15
|
# File 'lib/vertex_client/payloads/tax_area.rb', line 9
def body
{
tax_area_lookup: {
postal_address: transform_customer(params)[:destination]
}
}
end
|
#validate! ⇒ Object
5
6
7
|
# File 'lib/vertex_client/payloads/tax_area.rb', line 5
def validate!
raise VertexClient::ValidationError.new('At least give a value') if values_empty?
end
|
#values_empty? ⇒ Boolean
17
18
19
|
# File 'lib/vertex_client/payloads/tax_area.rb', line 17
def values_empty?
params.values.all?(&:empty?)
end
|