Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calling .transactions per docs raises NoMethodError #461

Closed
jcdavison opened this issue Jun 22, 2023 · 1 comment
Closed

calling .transactions per docs raises NoMethodError #461

jcdavison opened this issue Jun 22, 2023 · 1 comment

Comments

@jcdavison
Copy link

per the docs

request = Plaid::ItemPublicTokenExchangeRequest.new
request.public_token = public_token

response = client.item_public_token_exchange(request)
access_token = response.access_token

transactions_sync_request = Plaid::TransactionsSyncRequest.new
transactions_sync_request.access_token = access_token

transaction_response = client.transactions_sync(transactions_sync_request)
transactions = transaction_response.transactions

calling .transactions in sandbox raises NoMethodError

Any thoughts ?

s=nil, @city=nil, @region=nil, @postal_code=nil, @country=nil, @lat=nil, @lon=nil, @store_number="3322">, @name="McDonald's", @merchant_name="McDonald's", @original_description=nil, @payment_meta=#<Plaid::PaymentMeta:0x000000010934c5d8 @reference_number=nil, @ppd_id=nil, @payee=nil, @by_order_of=nil, @payer=nil, @payment_method=nil, @payment_processor=nil, @reason=nil>, @pending=false, @pending_transaction_id=nil, @account_owner=nil, @transaction_id="9D74gE1PbzTZrxw99R1vCwBmbDy6ydsqeqgZN", @transaction_type="place", @logo_url=nil, @website=nil, @authorized_date=Tue, 01 Feb 2022, @authorized_datetime=nil, @datetime=nil, @payment_channel="in store", @personal_finance_category=nil, @transaction_code=nil>], @modified=[], @removed=[], @next_cursor="CAESJTlENzRnRTFQYnpUWnJ4dzk5UjF2Q3dCbWJEeTZ5ZHNxZXFnWk4iCwjh8NCkBhCAxdhYKgsI4fDQpAYQwNKPWg==", @has_more=true, @request_id="nujBoxlbjEfHz7m"> (NoMethodError)

transactions = transaction_response.transactions
                                   ^^^^^^^^^^^^^
irb(main):013:0>
@phoenixy1
Copy link

Thanks for catching -- this is a mistake in the sample code; the last line should read transactions = transaction_response.added. We'll submit a fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants