Class: Io::Flow::V0::Models::ExportDelivery
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExportDelivery
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Export deliveries represent actions to take once a requested export has completed. A common pattern would be to request delivery of the export via email - you will then receive an email notification once the requested export is ready
Direct Known Subclasses
Defined Under Namespace
Modules: Types
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(incoming = {}) ⇒ ExportDelivery
constructor
A new instance of ExportDelivery.
- #to_hash ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ExportDelivery
Returns a new instance of ExportDelivery.
4299 4300 4301 4302 4303 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 4299 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:name], 'ExportDelivery') @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) end |
Class Method Details
.from_json(hash) ⇒ Object
4309 4310 4311 4312 4313 4314 4315 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 4309 def ExportDelivery.from_json(hash) HttpClient::Preconditions.assert_class('hash', hash, Hash) case HttpClient::Helper.symbolize_keys(hash)[:discriminator] when Types::EXPORT_DELIVERY_EMAIL; ExportDeliveryEmail.new(hash) else ExportDeliveryUndefinedType.new(:name => union_type_name) end end |
Instance Method Details
#to_hash ⇒ Object
4305 4306 4307 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 4305 def to_hash subtype_to_hash.merge(:discriminator => @name) end |