Class: Mws::Apis::Feeds::Feed::Message
- Inherits:
-
Object
- Object
- Mws::Apis::Feeds::Feed::Message
- Defined in:
- lib/mws/apis/feeds/feed.rb
Constant Summary collapse
- Type =
Mws::Enum.for( fufillment_center: 'FulfillmentCenter', inventory: 'Inventory', listings: 'Listings', order_acknowledgement: 'OrderAcknowledgement', order_adjustment: 'OrderAdjustment', order_fulfillment: 'OrderFulfillment', override: 'Override', price: 'Price', processing_report: 'ProcessingReport', product: 'Product', image: 'ProductImage', relationship: 'Relationship', settlement_report: 'SettlementReport' )
- OperationType =
Mws::Enum.for( update: 'Update', delete: 'Delete', partial_update: 'PartialUpdate' )
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
-
#initialize(id, type, resource, operation_type) ⇒ Message
constructor
A new instance of Message.
- #to_xml(parent) ⇒ Object
Constructor Details
#initialize(id, type, resource, operation_type) ⇒ Message
Returns a new instance of Message.
96 97 98 99 100 101 |
# File 'lib/mws/apis/feeds/feed.rb', line 96 def initialize(id, type, resource, operation_type) @id = id @type = Type.for(type) @resource = resource @operation_type = OperationType.for(operation_type) || OperationType.UPDATE end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
92 93 94 |
# File 'lib/mws/apis/feeds/feed.rb', line 92 def id @id end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
92 93 94 |
# File 'lib/mws/apis/feeds/feed.rb', line 92 def resource @resource end |
Instance Method Details
#to_xml(parent) ⇒ Object
103 104 105 106 107 108 109 |
# File 'lib/mws/apis/feeds/feed.rb', line 103 def to_xml(parent) Mws::Serializer.tree 'Message', parent do | xml | xml.MessageID @id xml.OperationType @operation_type.val @resource.to_xml @type.val, xml end end |