Sha256: 6ec60da27cd37620ba8e96e0cfed695e3ec143ef92942d7490678290df5e95d8

Contents?: true

Size: 1.37 KB

Versions: 1

Compression:

Stored size: 1.37 KB

Contents

% if mode == 'definition':
Balanced::Reversal.save

% elif mode == 'request':
require 'balanced'
Balanced.configure('ak-test-1kvvievk0Qqw5wQPsrlM9g7wQwNe62cyc')

reversal = Balanced::Reversal.fetch('/reversals/RV42n8M9XZWna427oPDDi4RG')
reversal.description = 'update this description'
reversal.meta = {
    'refund.reason' => 'user not happy with product',
    'user.notes' => 'very polite on the phone',
    'user.satisfaction' => '6'
}
reversal.save

% elif mode == 'response':
#<Balanced::Reversal:0x007fdc9e82cd50
 @attributes=
  {"amount"=>3000,
   "created_at"=>"2014-01-27T22:58:21.214829Z",
   "currency"=>"USD",
   "description"=>"update this description",
   "failure_reason"=>nil,
   "failure_reason_code"=>nil,
   "href"=>"/reversals/RV42n8M9XZWna427oPDDi4RG",
   "id"=>"RV42n8M9XZWna427oPDDi4RG",
   "links"=>{"credit"=>"CR40neytmVG2HDBp1opfF7sY", "order"=>nil},
   "meta"=>
    {"refund.reason"=>"user not happy with product",
     "user.notes"=>"very polite on the phone",
     "user.satisfaction"=>"6"},
   "status"=>"succeeded",
   "transaction_number"=>"RV219-169-0008",
   "updated_at"=>"2014-01-27T22:58:27.354488Z"},
 @hyperlinks=
  {"credit"=>
    #<Proc:0x007fdc9e827440/lib/balanced/resources/resource.rb:60 (lambda)>,
   "events"=>
    #<Proc:0x007fdc9e825078/lib/balanced/utils.rb:6 (lambda)>,
   "order"=>
    #<Proc:0x007fdc9e8245b0/lib/balanced/utils.rb:6 (lambda)>}>

% endif

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
balanced-1.0.beta1 scenarios/reversal_update/ruby.mako