Class: BlommingApi::Client
- Inherits:
-
Object
- Object
- BlommingApi::Client
- Includes:
- BuyEndpoints, Config, OauthEndpoint, PrivateHelpers, PublicHelpers, SellEndpoints
- Defined in:
- lib/blomming_api.rb
Overview
CLIENT ACCESS LOGIC
Instance Attribute Summary collapse
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
-
#api_version ⇒ Object
readonly
Returns the value of attribute api_version.
-
#client_id ⇒ Object
readonly
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
readonly
Returns the value of attribute client_secret.
-
#currency ⇒ Object
instance variables, read/write.
-
#description ⇒ Object
readonly
instance variables, read-only.
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#expires_in ⇒ Object
readonly
Returns the value of attribute expires_in.
-
#grant_type ⇒ Object
readonly
Returns the value of attribute grant_type.
-
#locale ⇒ Object
instance variables, read/write.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#refresh_token ⇒ Object
readonly
Returns the value of attribute refresh_token.
-
#retry_seconds ⇒ Object
readonly
integer: number of seconds between a call and the successive in case of a retry of an API call.
-
#services ⇒ Object
readonly
Returns the value of attribute services.
-
#survive_on_fatal_error ⇒ Object
readonly
boolean: if false, in case of exceptions, process die with exit.
-
#token_type ⇒ Object
readonly
Returns the value of attribute token_type.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
-
#verbose ⇒ Object
instance variables, read/write.
Instance Method Summary collapse
-
#initialize(config_filename) ⇒ Client
constructor
new.
Methods included from PublicHelpers
#all_pages, collect_key_values, #dump_pretty, id_from_name, #puts_response_header
Methods included from SellEndpoints
#sell_payment_types_create, #sell_payment_types_delete, #sell_payment_types_find, #sell_payment_types_update, #sell_register, #sell_shipping_countries_all, #sell_shipping_profile_create, #sell_shipping_profile_delete, #sell_shipping_profile_find, #sell_shipping_profile_item_create, #sell_shipping_profile_update, #sell_shipping_profiles, #sell_shipping_regions, #sell_shop_dashboard, #sell_shop_item_create, #sell_shop_item_delete, #sell_shop_item_find, #sell_shop_item_tags_add, #sell_shop_item_tags_remove, #sell_shop_item_update, #sell_shop_items, #sell_shop_orders, #sell_shop_orders_change_state, #sell_shop_orders_find, #sell_shop_orders_request_cancellation, #sell_shop_orders_states, #sell_shop_shipping_profiles, #sell_shop_user_details
Methods included from BuyEndpoints
#carts_add, #carts_checkout, #carts_clear, #carts_create, #carts_place_paypal_order, #carts_remove, #carts_shipping_countries, #carts_show, #carts_validate, #categories, #category_items, #collection_items, #collections, #countries, #currencies, #items_discounted, #items_featured, #items_hand_picked, #items_list, #items_most_liked, #items_search, #macrocategories, #macrocategory_categories, #macrocategory_items, #password_resets, #provinces, #shop_item, #shop_items, #shops, #shops_find, #tags, #tags_items
Methods included from OauthEndpoint
Methods included from PrivateHelpers
#api_url, #authenticate_refresh, #fatal_error!, #feed_or_retry, #http_status_code_401?, #http_status_code_4xx?, #http_status_code_5xx?, #request_params, #server_error!, #socket_error!, #unknown_error!
Methods included from Config
Constructor Details
#initialize(config_filename) ⇒ Client
new
54 55 56 57 58 59 60 |
# File 'lib/blomming_api.rb', line 54 def initialize(config_filename) # read YAML configuration file read_config_file config_filename # authenticate client when a new client is created authenticate :initialize end |
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
39 40 41 |
# File 'lib/blomming_api.rb', line 39 def access_token @access_token end |
#api_version ⇒ Object (readonly)
Returns the value of attribute api_version.
38 39 40 |
# File 'lib/blomming_api.rb', line 38 def api_version @api_version end |
#client_id ⇒ Object (readonly)
Returns the value of attribute client_id.
37 38 39 |
# File 'lib/blomming_api.rb', line 37 def client_id @client_id end |
#client_secret ⇒ Object (readonly)
Returns the value of attribute client_secret.
37 38 39 |
# File 'lib/blomming_api.rb', line 37 def client_secret @client_secret end |
#currency ⇒ Object
instance variables, read/write
42 43 44 |
# File 'lib/blomming_api.rb', line 42 def currency @currency end |
#description ⇒ Object (readonly)
instance variables, read-only
35 36 37 |
# File 'lib/blomming_api.rb', line 35 def description @description end |
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
38 39 40 |
# File 'lib/blomming_api.rb', line 38 def domain @domain end |
#expires_in ⇒ Object (readonly)
Returns the value of attribute expires_in.
39 40 41 |
# File 'lib/blomming_api.rb', line 39 def expires_in @expires_in end |
#grant_type ⇒ Object (readonly)
Returns the value of attribute grant_type.
36 37 38 |
# File 'lib/blomming_api.rb', line 36 def grant_type @grant_type end |
#locale ⇒ Object
instance variables, read/write
42 43 44 |
# File 'lib/blomming_api.rb', line 42 def locale @locale end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
37 38 39 |
# File 'lib/blomming_api.rb', line 37 def password @password end |
#refresh_token ⇒ Object (readonly)
Returns the value of attribute refresh_token.
39 40 41 |
# File 'lib/blomming_api.rb', line 39 def refresh_token @refresh_token end |
#retry_seconds ⇒ Object (readonly)
integer: number of seconds between a call and the successive in case of a retry of an API call
47 48 49 |
# File 'lib/blomming_api.rb', line 47 def retry_seconds @retry_seconds end |
#services ⇒ Object (readonly)
Returns the value of attribute services.
36 37 38 |
# File 'lib/blomming_api.rb', line 36 def services @services end |
#survive_on_fatal_error ⇒ Object (readonly)
boolean: if false, in case of exceptions, process die with exit
51 52 53 |
# File 'lib/blomming_api.rb', line 51 def survive_on_fatal_error @survive_on_fatal_error end |
#token_type ⇒ Object (readonly)
Returns the value of attribute token_type.
39 40 41 |
# File 'lib/blomming_api.rb', line 39 def token_type @token_type end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
37 38 39 |
# File 'lib/blomming_api.rb', line 37 def username @username end |
#verbose ⇒ Object
instance variables, read/write
42 43 44 |
# File 'lib/blomming_api.rb', line 42 def verbose @verbose end |