Class: Io::Flow::V0::Models::ExportDeliveryEmail

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

Overview

Triggers an email notification once the requested export is ready

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ExportDelivery

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ ExportDeliveryEmail

Returns a new instance of ExportDeliveryEmail.



10112
10113
10114
10115
10116
10117
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10112

def initialize(incoming={})
  super(:name => ExportDelivery::Types::EXPORT_DELIVERY_EMAIL)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:email], 'ExportDeliveryEmail')
  @email = HttpClient::Preconditions.assert_class('email', opts.delete(:email), String)
end

Instance Attribute Details

#emailObject (readonly)

Returns the value of attribute email.



10110
10111
10112
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10110

def email
  @email
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



10123
10124
10125
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10123

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

#subtype_to_hashObject



10127
10128
10129
10130
10131
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10127

def subtype_to_hash
  {
    :email => email
  }
end

#to_jsonObject



10119
10120
10121
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10119

def to_json
  JSON.dump(to_hash)
end