Class: AmadeusDiscover::Namespaces::Suppliers::Products::Member
- Inherits:
-
AmadeusDiscover::Namespace
- Object
- AmadeusDiscover::Namespace
- AmadeusDiscover::Namespaces::Suppliers::Products::Member
- Defined in:
- lib/amadeus_discover/namespaces/suppliers/products.rb
Overview
Namespace for actions on a supplier’s product.
Instance Attribute Summary collapse
-
#product_id ⇒ Object
readonly
Returns the value of attribute product_id.
Instance Method Summary collapse
-
#delete ⇒ Object
Delete product.
-
#get ⇒ Object
Retrieve product information.
-
#initialize(client, product_id) ⇒ Member
constructor
A new instance of Member.
-
#update(product_data) ⇒ Object
Udpate product.
Constructor Details
#initialize(client, product_id) ⇒ Member
Returns a new instance of Member.
32 33 34 35 |
# File 'lib/amadeus_discover/namespaces/suppliers/products.rb', line 32 def initialize(client, product_id) @product_id = product_id super(client) end |
Instance Attribute Details
#product_id ⇒ Object (readonly)
Returns the value of attribute product_id.
30 31 32 |
# File 'lib/amadeus_discover/namespaces/suppliers/products.rb', line 30 def product_id @product_id end |
Instance Method Details
#delete ⇒ Object
Delete product
48 49 50 |
# File 'lib/amadeus_discover/namespaces/suppliers/products.rb', line 48 def delete connection.delete(path).body end |
#get ⇒ Object
Retrieve product information
38 39 40 |
# File 'lib/amadeus_discover/namespaces/suppliers/products.rb', line 38 def get connection.get(path).body end |
#update(product_data) ⇒ Object
Udpate product
43 44 45 |
# File 'lib/amadeus_discover/namespaces/suppliers/products.rb', line 43 def update(product_data) connection.post(path, product_data).body end |