Class: FdxV660Api::PayeeEntityErrorException
- Inherits:
-
APIException
- Object
- CoreLibrary::ApiException
- APIException
- FdxV660Api::PayeeEntityErrorException
- Defined in:
- lib/fdx_v660_api/exceptions/payee_entity_error_exception.rb
Overview
Payee to whom funds can be transferred. Can be extended to support additional types of payees
Instance Attribute Summary collapse
-
#merchant ⇒ MerchantEntity1
When payee is a merchant, typically a business from which goods or services are rendered, this field will be populated.
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ PayeeEntityErrorException
constructor
The constructor.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
-
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash.
Constructor Details
#initialize(reason, response) ⇒ PayeeEntityErrorException
The constructor.
21 22 23 24 25 |
# File 'lib/fdx_v660_api/exceptions/payee_entity_error_exception.rb', line 21 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end |
Instance Attribute Details
#merchant ⇒ MerchantEntity1
When payee is a merchant, typically a business from which goods or services are rendered, this field will be populated
16 17 18 |
# File 'lib/fdx_v660_api/exceptions/payee_entity_error_exception.rb', line 16 def merchant @merchant end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
43 44 45 46 |
# File 'lib/fdx_v660_api/exceptions/payee_entity_error_exception.rb', line 43 def inspect class_name = self.class.name.split('::').last "<#{class_name} merchant: #{@merchant.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
37 38 39 40 |
# File 'lib/fdx_v660_api/exceptions/payee_entity_error_exception.rb', line 37 def to_s class_name = self.class.name.split('::').last "<#{class_name} merchant: #{@merchant}>" end |
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash. response body.
30 31 32 33 34 |
# File 'lib/fdx_v660_api/exceptions/payee_entity_error_exception.rb', line 30 def unbox(hash) return nil unless hash @merchant = MerchantEntity1.from_hash(hash['merchant']) if hash['merchant'] end |