Class: Io::Flow::V0::Models::PostPaymentRedirectUrls

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Overview

The URLs to which the customer will be redirected based on the authorization status.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ PostPaymentRedirectUrls

Returns a new instance of PostPaymentRedirectUrls.



34534
34535
34536
34537
34538
34539
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34534

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:success], 'PostPaymentRedirectUrls')
  @success = HttpClient::Preconditions.assert_class('success', opts.delete(:success), String)
  @failure = (x = opts.delete(:failure); x.nil? ? nil : HttpClient::Preconditions.assert_class('failure', x, String))
end

Instance Attribute Details

#failureObject (readonly)

Returns the value of attribute failure.



34532
34533
34534
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34532

def failure
  @failure
end

#successObject (readonly)

Returns the value of attribute success.



34532
34533
34534
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34532

def success
  @success
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



34545
34546
34547
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34545

def copy(incoming={})
  PostPaymentRedirectUrls.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



34549
34550
34551
34552
34553
34554
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34549

def to_hash
  {
    :success => success,
    :failure => failure
  }
end

#to_jsonObject



34541
34542
34543
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34541

def to_json
  JSON.dump(to_hash)
end