Class: Io::Flow::V0::Models::Event
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::Event
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Direct Known Subclasses
AuthorizationDeleted, AuthorizationUpserted, CaptureUpserted, CardDeleted, CardUpserted, CatalogDeleted, CatalogItemDeleted, CatalogItemUpserted, CatalogUpserted, ContractedRateUpserted, EventUndefinedType, ExperienceDeleted, ExperienceUpserted, FlowCurrencySettingDeleted, FlowCurrencySettingUpserted, Hs10CodeDeleted, Hs10CodeUpserted, Hs6CodeDeleted, Hs6CodeUpserted, ItemMarginDeleted, ItemMarginUpserted, LabelUpserted, LocalizedItemDeleted, LocalizedItemSnapshot, LocalizedItemUpserted, NotificationDeleted, NotificationUpserted, OrderBookingDeleted, OrderBookingUpserted, OrderDeleted, OrderUpserted, OrganizationCurrencySettingDeleted, OrganizationCurrencySettingUpserted, OrganizationDeleted, OrganizationUpserted, RateDeleted, RateUpserted, RefundUpserted, SpotRateDeleted, SpotRateUpserted, SubcatalogDeleted, SubcatalogItemDeleted, SubcatalogItemUpserted, SubcatalogUpserted, TargetingItemDeleted, TargetingItemUpserted, TrackingLabelEventUpserted
Defined Under Namespace
Modules: Types
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(incoming = {}) ⇒ Event
constructor
A new instance of Event.
- #subtype_to_hash ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ Event
Returns a new instance of Event.
4128 4129 4130 4131 4132 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 4128 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:name], 'Event') @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) end |
Class Method Details
.from_json(hash) ⇒ Object
Instance Method Details
#subtype_to_hash ⇒ Object
4134 4135 4136 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 4134 def subtype_to_hash raise 'Cannot serialize an instance of event directly - must use one of the specific types: catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, flow_currency_setting_deleted, flow_currency_setting_upserted, rate_deleted, rate_upserted, spot_rate_deleted, spot_rate_upserted, organization_currency_setting_deleted, organization_currency_setting_upserted, contracted_rate_upserted, experience_deleted, experience_upserted, item_margin_deleted, item_margin_upserted, order_deleted, order_upserted, order_booking_deleted, order_booking_upserted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, label_upserted, notification_upserted, notification_deleted, localized_item_upserted, localized_item_deleted, localized_item_snapshot, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, capture_upserted, card_upserted, card_deleted, refund_upserted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted' end |
#to_hash ⇒ Object
4138 4139 4140 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 4138 def to_hash subtype_to_hash.merge(:discriminator => @name) end |