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



13479
13480
13481
13482
13483
13484
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13479

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.



13477
13478
13479
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13477

def email
  @email
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



13490
13491
13492
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13490

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

#subtype_to_hashObject



13494
13495
13496
13497
13498
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13494

def subtype_to_hash
  {
    :email => email
  }
end

#to_jsonObject



13486
13487
13488
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13486

def to_json
  JSON.dump(to_hash)
end