Class: Api::Dimass::Operations::Article
- Inherits:
-
Base
- Object
- Base
- Api::Dimass::Operations::Article
show all
- Defined in:
- app/services/api/dimass/operations/article.rb
Constant Summary
collapse
- PATH =
"/papi/article/1.0"
- NAMESPACE =
"art"
- WSDL =
"v1/article"
- PARTNER_CODE =
The article codes must be prefixed with your partner code (which consist of four characters).
Please contact your SupportPlaza sales representative if you have questing regarding your partner code
"WARM"
Instance Attribute Summary
Attributes inherited from Base
#api_key, #api_secret, #api_url, #endpoint_url, #namespace, #wsdl, #wsdl_content
Instance Method Summary
collapse
Methods inherited from Base
#authenticated_endpoint_url, #client, #nonce, #operations, #refresh_wsdl, #retrieve_wsdl_content, #signature_params, #timestamp, #wsdl_local_path
Constructor Details
Returns a new instance of Article.
13
14
15
|
# File 'app/services/api/dimass/operations/article.rb', line 13
def initialize
super(PATH, NAMESPACE, WSDL)
end
|
Instance Method Details
#create_article(article_params) ⇒ Object
22
23
24
25
|
# File 'app/services/api/dimass/operations/article.rb', line 22
def create_article(article_params)
r = client.call(:create_article, message: { article: article_params })
r.body.dig(:create_article_response, :return)
end
|
#get_article(id) ⇒ Object
27
28
29
30
|
# File 'app/services/api/dimass/operations/article.rb', line 27
def get_article(id)
r = client.call(:get_article, message: {id: id})
r.body.dig(:get_article_response, :return)
end
|
#get_articles ⇒ Object
17
18
19
20
|
# File 'app/services/api/dimass/operations/article.rb', line 17
def get_articles
r = client.call(:get_articles)
r.body.dig(:get_articles_response, :return, :item)
end
|
#update_article(article_params) ⇒ Object
32
33
34
|
# File 'app/services/api/dimass/operations/article.rb', line 32
def update_article(article_params)
r = client.call(:update_article, message: { article: article_params })
end
|
#update_articles(articles) ⇒ Object
36
37
38
|
# File 'app/services/api/dimass/operations/article.rb', line 36
def update_articles(articles)
client.call(:update_articles, message: { articles: articles})
end
|