Class: Io::Flow::V0::Clients::EmailVerifications

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

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ EmailVerifications



4035
4036
4037
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 4035

def initialize(client)
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
end

Instance Method Details

#post_by_token(token, hash) ⇒ Object



4039
4040
4041
4042
4043
4044
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 4039

def post_by_token(token, hash)
  HttpClient::Preconditions.assert_class('token', token, String)
  HttpClient::Preconditions.assert_class('hash', hash, Hash)
  r = @client.request("/users/emails/verifications/#{CGI.escape(token)}").with_json(hash.to_json).post
  ::Io::Flow::V0::Models::EmailVerification.new(r)
end