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.



44132
44133
44134
44135
44136
44137
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44132

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.



44130
44131
44132
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44130

def failure
  @failure
end

#successObject (readonly)

Returns the value of attribute success.



44130
44131
44132
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44130

def success
  @success
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



44143
44144
44145
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44143

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

#to_hashObject



44147
44148
44149
44150
44151
44152
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44147

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

#to_jsonObject



44139
44140
44141
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44139

def to_json
  JSON.dump(to_hash)
end