bigcommerce / bigcommerce-api-ruby

Connect Ruby applications with the Bigcommerce Platform
https://developer.bigcommerce.com
MIT License
78 stars 122 forks source link

Json response? #150

Open glynhudson opened 6 years ago

glynhudson commented 6 years ago

Is it possible to obtain a json responce?

e.g @shop_orders << Bigcommerce::Order.find(@order.id) reurns a space sperated string.

#<Bigcommerce::Order base_handling_cost="0.0000" base_shipping_cost="12.3800" base_wrapping_cost="0.0000" billing_address={:first_name=>"Jari", :last_name=>"xxxx", :company=>"", :street_1=>"Niinikuja 4", :street_2=>"", :city=>"Tampere", :state=>"", :zip=>"33900", :country=>"xxxxx", :country_iso2=>"FI", :phone=>"xxxxxxxxxxx", :email=>"xxxxxxxx", :form_fields=>[]} coupon_discount="0.0000" coupons={:url=>"https://xxxxxxxxxx/api/v2/orders/xxxx/coupons.json",
:resource=>"/orders/18xxx434/coupons"} credit_card_type=nil currency_code="GBP" currency_exchange_rate="1.0000000000" currency_id=1 customer_id=10100........
sshaw commented 1 year ago

I think you'd have to convert it yourself: puts order.to_json