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

Attributes inherited from ExportDelivery

#discriminator

Instance Method Summary collapse

Methods inherited from ExportDelivery

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ ExportDeliveryEmail

Returns a new instance of ExportDeliveryEmail.



19177
19178
19179
19180
19181
19182
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19177

def initialize(incoming={})
  super(:discriminator => 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.



19175
19176
19177
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19175

def email
  @email
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



19188
19189
19190
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19188

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

#subtype_to_hashObject



19192
19193
19194
19195
19196
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19192

def subtype_to_hash
  {
    :email => email
  }
end

#to_jsonObject



19184
19185
19186
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19184

def to_json
  JSON.dump(to_hash)
end