Class: AdvancedBilling::SubscriptionGroupUpdateErrorResponseException

Inherits:
APIException
  • Object
show all
Defined in:
lib/advanced_billing/exceptions/subscription_group_update_error_response_exception.rb

Overview

Subscription Group Update Error Response class.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason, response) ⇒ SubscriptionGroupUpdateErrorResponseException

The constructor.

Parameters:

  • The (String)

    reason for raising an exception.

  • The (HttpResponse)

    HttpReponse of the API call.



19
20
21
22
23
# File 'lib/advanced_billing/exceptions/subscription_group_update_error_response_exception.rb', line 19

def initialize(reason, response)
  super(reason, response)
  hash = APIHelper.json_deserialize(@response.raw_body)
  unbox(hash)
end

Instance Attribute Details

#errorsSubscriptionGroupUpdateError

TODO: Write general description for this method



14
15
16
# File 'lib/advanced_billing/exceptions/subscription_group_update_error_response_exception.rb', line 14

def errors
  @errors
end

Instance Method Details

#unbox(hash) ⇒ Object

Populates this object by extracting properties from a hash. response body.

Parameters:

  • The (Hash)

    deserialized response sent by the server in the



28
29
30
# File 'lib/advanced_billing/exceptions/subscription_group_update_error_response_exception.rb', line 28

def unbox(hash)
  @errors = SubscriptionGroupUpdateError.from_hash(hash['errors']) if hash['errors']
end