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
AllocationDeleted, AllocationUpserted, AttributeDeleted, AttributeUpserted, AuthorizationDeleted, AuthorizationDeletedV2, AuthorizationStatusChanged, AuthorizationUpserted, AvailablePromotionsDeleted, AvailablePromotionsUpserted, CaptureUpserted, CaptureUpsertedV2, CardAuthorizationUpserted, CardAuthorizationUpsertedV2, CardDeleted, CardUpserted, CardUpsertedV2, CatalogDeleted, CatalogItemDeleted, CatalogItemUpserted, CatalogUpserted, EventUndefinedType, ExperienceDeleted, ExperienceUpserted, FullyHarmonizedItemUpserted, HarmonizedItemDeleted, HarmonizedItemUpserted, HarmonizedLandedCostUpserted, Hs10CodeDeleted, Hs10CodeUpserted, Hs6CodeDeleted, Hs6CodeUpserted, ItemMarginDeleted, ItemMarginUpserted, ItemOriginDeleted, ItemOriginUpserted, ItemSalesMarginDeleted, ItemSalesMarginUpserted, LabelFormatDeleted, LabelFormatUpserted, LabelUpserted, LocalItemDeleted, LocalItemUpserted, ManifestedLabelDeleted, ManifestedLabelUpserted, MembershipDeleted, MembershipUpserted, NotificationDeleted, NotificationUpserted, OnlineAuthorizationUpserted, OnlineAuthorizationUpsertedV2, OrderDeleted, OrderIdentifierDeleted, OrderIdentifierUpserted, OrderUpserted, OrganizationCountriesPublished, OrganizationDeleted, OrganizationRatesPublished, OrganizationUpserted, PaymentDeleted, PaymentUpserted, PricingDeleted, PricingUpserted, RateDeleted, RateUpserted, RefundUpserted, RefundUpsertedV2, ReturnDeleted, ReturnUpserted, ReversalUpserted, RuleDeleted, RuleUpserted, SnapshotDeleted, SnapshotUpserted, SubcatalogDeleted, SubcatalogItemDeleted, SubcatalogItemUpserted, SubcatalogUpserted, TargetingItemDeleted, TargetingItemUpserted, TierDeleted, TierUpserted, TrackingLabelEventUpserted
Defined Under Namespace
Modules: Types
Instance Attribute Summary collapse
-
#discriminator ⇒ Object
readonly
Returns the value of attribute discriminator.
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.
5530 5531 5532 5533 5534 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5530 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:discriminator], 'Event') @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String) end |
Instance Attribute Details
#discriminator ⇒ Object (readonly)
Returns the value of attribute discriminator.
5528 5529 5530 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5528 def discriminator @discriminator end |
Class Method Details
.from_json(hash) ⇒ Object
Instance Method Details
#subtype_to_hash ⇒ Object
5536 5537 5538 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5536 def subtype_to_hash raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, rate_deleted, rate_upserted, available_promotions_upserted, available_promotions_deleted, allocation_deleted, allocation_upserted, experience_deleted, experience_upserted, item_margin_deleted, item_margin_upserted, item_sales_margin_deleted, item_sales_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, order_identifier_deleted, order_identifier_upserted, pricing_deleted, pricing_upserted, tier_upserted, tier_deleted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, harmonized_landed_cost_upserted, fully_harmonized_item_upserted, rule_upserted, rule_deleted, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, manifested_label_upserted, manifested_label_deleted, local_item_upserted, local_item_deleted, membership_upserted, membership_deleted, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, authorization_deleted_v2, authorization_status_changed, card_authorization_upserted, card_authorization_upserted_v2, online_authorization_upserted, online_authorization_upserted_v2, capture_upserted, capture_upserted_v2, card_upserted, card_upserted_v2, card_deleted, payment_upserted, payment_deleted, refund_upserted, refund_upserted_v2, reversal_upserted, organization_rates_published, organization_countries_published, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted' end |
#to_hash ⇒ Object
5540 5541 5542 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5540 def to_hash subtype_to_hash.merge(:discriminator => @discriminator) end |