Class: BigcommerceAPI::Store
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#admin_email ⇒ Object
Returns the value of attribute admin_email.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#currency_symbol ⇒ Object
Returns the value of attribute currency_symbol.
-
#currency_symbol_location ⇒ Object
Returns the value of attribute currency_symbol_location.
-
#decimal_places ⇒ Object
Returns the value of attribute decimal_places.
-
#decimal_separator ⇒ Object
Returns the value of attribute decimal_separator.
-
#dimension_units ⇒ Object
Returns the value of attribute dimension_units.
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#id ⇒ Object
Returns the value of attribute id.
-
#language ⇒ Object
Returns the value of attribute language.
-
#logo ⇒ Object
Returns the value of attribute logo.
-
#name ⇒ Object
Returns the value of attribute name.
-
#order_email ⇒ Object
Returns the value of attribute order_email.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#plan_name ⇒ Object
Returns the value of attribute plan_name.
-
#thousands_separator ⇒ Object
Returns the value of attribute thousands_separator.
-
#weight_units ⇒ Object
Returns the value of attribute weight_units.
Instance Method Summary collapse
-
#initialize(data) ⇒ Store
constructor
Sample response “domain”=>“XXXX.mybigcommerce.com”, “name”=>“XXXX”, “address”=>“”, “phone”=>“”, “admin_email”=>“XXX”, “order_email”=>“XXX”, “language”=>“en”, “currency”=>“USD”, “currency_symbol”=>“$”, “decimal_separator”=>“.”, “thousands_separator”=>“,”, “decimal_places”=>2, “currency_symbol_location”=>“left”, “weight_units”=>“LBS”, “dimension_units”=>“Inches”, “plan_name”=>“Partner Sandbox”.
Methods inherited from Base
#attributes, clean!, date_adjust, default_options, #store, #time, to_rfc2822
Constructor Details
#initialize(data) ⇒ Store
Sample response “domain”=>“XXXX.mybigcommerce.com”, “name”=>“XXXX”, “address”=>“”, “phone”=>“”, “admin_email”=>“XXX”, “order_email”=>“XXX”, “language”=>“en”, “currency”=>“USD”, “currency_symbol”=>“$”, “decimal_separator”=>“.”, “thousands_separator”=>“,”, “decimal_places”=>2, “currency_symbol_location”=>“left”, “weight_units”=>“LBS”, “dimension_units”=>“Inches”, “plan_name”=>“Partner Sandbox”
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/bigcommerce_api/store.rb', line 25 def initialize(data) data.each do |k, v| if v and v.is_a? String val = v.gsub(/\n/, '').gsub(/\t/, '').strip else val = v end send(:"#{k}=", val) if self.respond_to? "#{k}=" end end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def address @address end |
#admin_email ⇒ Object
Returns the value of attribute admin_email.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def admin_email @admin_email end |
#currency ⇒ Object
Returns the value of attribute currency.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def currency @currency end |
#currency_symbol ⇒ Object
Returns the value of attribute currency_symbol.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def currency_symbol @currency_symbol end |
#currency_symbol_location ⇒ Object
Returns the value of attribute currency_symbol_location.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def currency_symbol_location @currency_symbol_location end |
#decimal_places ⇒ Object
Returns the value of attribute decimal_places.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def decimal_places @decimal_places end |
#decimal_separator ⇒ Object
Returns the value of attribute decimal_separator.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def decimal_separator @decimal_separator end |
#dimension_units ⇒ Object
Returns the value of attribute dimension_units.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def dimension_units @dimension_units end |
#domain ⇒ Object
Returns the value of attribute domain.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def domain @domain end |
#errors ⇒ Object
Returns the value of attribute errors.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def errors @errors end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def id @id end |
#language ⇒ Object
Returns the value of attribute language.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def language @language end |
#logo ⇒ Object
Returns the value of attribute logo.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def logo @logo end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def name @name end |
#order_email ⇒ Object
Returns the value of attribute order_email.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def order_email @order_email end |
#phone ⇒ Object
Returns the value of attribute phone.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def phone @phone end |
#plan_name ⇒ Object
Returns the value of attribute plan_name.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def plan_name @plan_name end |
#thousands_separator ⇒ Object
Returns the value of attribute thousands_separator.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def thousands_separator @thousands_separator end |
#weight_units ⇒ Object
Returns the value of attribute weight_units.
3 4 5 |
# File 'lib/bigcommerce_api/store.rb', line 3 def weight_units @weight_units end |