Skip to content

customer.login_token "missing method" #147

@uuunk

Description

@uuunk

Using the customer login example, customer.login_token returns a NoMethodError.

Expected behavior

Should return JWT

Actual behavior

/Users/lorsbach/.rvm/gems/ruby-2.3.1/gems/hashie-3.5.6/lib/hashie/extensions/method_access.rb:46:in `method_missing': undefined method `login_token' for #<Bigcommerce::Customer:0x007fc0f7e80688> (NoMethodError)

Steps to reproduce behavior

in gemfile: gem 'bigcommerce', '~> 1.0.0'

require 'bigcommerce'

Bigcommerce.configure do |config|
  config.store_hash = ENV['BC_STORE_HASH']
  config.client_id = ENV['BC_CLIENT_ID']
  config.client_secret = ENV['BC_CLIENT_SECRET']
  config.access_token = ENV['BC_ACCESS_TOKEN']
end

puts Bigcommerce::System.time
# Get a customer
puts customer = Bigcommerce::Customer.all(page: 1).first
puts customer.first_name #returns first name correctly

puts Bigcommerce::Customer.methods - Bigcommerce::Resource.methods

# Generate token login url
puts customer.login_token

The methods call above returns:
count
path
find
update
create
all
destroy
destroy_all
delete
post
get
put
raw_request

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions