diff --git a/balanced.cache b/balanced.cache new file mode 100644 index 0000000000..fc433c4927 --- /dev/null +++ b/balanced.cache @@ -0,0 +1,9 @@ +/customers/CU2AeM9eNm4xOlzMf2giQLSM +/customers/CU2AB9rAnNMIk2WVUYzTM5bO +/customers/CU2AXHbONP7DZ2icdaC2SKod +/customers/CU2C8JIiShKQwRsfx1lApiCN +/customers/CU2CykeO7fm4GdldRFL9gvEF +/customers/CU2CVUDM4bDUxbDiFQdCFrJS +/customers/CU2DhhxA0V2thT9S8ycuMff7 +/customers/CU2DJQgKRESgGP12GHikqsla +/customers/CU2E60G2l5ekRRlIQK6CMHch diff --git a/bin/masspay.py b/bin/masspay.py index dd039d9214..ce2ac38b86 100755 --- a/bin/masspay.py +++ b/bin/masspay.py @@ -136,7 +136,7 @@ def compute_input_csv(): print_rule(88) total_gross = 0 for participant in participants: - tips, total = participant.get_tips_and_total(for_payday=False) + total = participant.giving + participant.pledging amount = participant.balance - total if amount < 0.50: # Minimum payout of 50 cents. I think that otherwise PayPal upcharges to a penny. diff --git a/branch.py b/branch.py new file mode 100644 index 0000000000..4b45fcf077 --- /dev/null +++ b/branch.py @@ -0,0 +1,127 @@ +"""Populate a Balanced test marketplace per a db. +""" +import balanced +from gittip import wireup +from gittip.billing.exchanges import customer_from_href + + +print "Wiring up ..." + +env = wireup.env() +wireup.billing(env) +db = wireup.db(env) + + +try: + cache = open('balanced.cache').read().splitlines() + import pdb; pdb.set_trace() + print "Populating Balanced from cache ..." + + no_card_no_bank = customer_from_href(cache[0]) + no_card_good_bank = customer_from_href(cache[1]) + no_card_bad_bank = customer_from_href(cache[2]) + good_card_no_bank = customer_from_href(cache[3]) + good_card_good_bank = customer_from_href(cache[4]) + good_card_bad_bank = customer_from_href(cache[5]) + bad_card_no_bank = customer_from_href(cache[6]) + bad_card_good_bank = customer_from_href(cache[7]) + bad_card_bad_bank = customer_from_href(cache[8]) + +except IOError: + print "Populating Balanced ..." + + no_card_no_bank = balanced.Customer(email='TEST-no-card-no-bank@gittip.com').save() + no_card_good_bank = balanced.Customer(email='TEST-no-card-good-bank@gittip.com').save() + no_card_bad_bank = balanced.Customer(email='TEST-no-card-bad-bank@gittip.com').save() + good_card_no_bank = balanced.Customer(email='TEST-good-card-no-bank@gittip.com').save() + good_card_good_bank = balanced.Customer(email='TEST-good-card-good-bank@gittip.com').save() + good_card_bad_bank = balanced.Customer(email='TEST-good-card-bad-bank@gittip.com').save() + bad_card_no_bank = balanced.Customer(email='TEST-bad-card-no-bank@gittip.com').save() + bad_card_good_bank = balanced.Customer(email='TEST-bad-card-good-bank@gittip.com').save() + bad_card_bad_bank = balanced.Customer(email='TEST-bad-card-bad-bank@gittip.com').save() + + + # https://docs.balancedpayments.com/1.1/overview/resources/#test-credit-card-numbers + good_card = lambda: balanced.Card( number="4111111111111111" + , expiration_month="12" + , expiration_year="2015").save() + bad_card = lambda: balanced.Card( number="4444444444444448" + , expiration_month="12" + , expiration_year="2015").save() + + # https://docs.balancedpayments.com/1.1/overview/resources/#test-bank-account-numbers + good_bank = lambda: balanced.BankAccount( account_number="9900000002" + , routing_number="021000021" + , name="Foo").save() + bad_bank = lambda: balanced.BankAccount( account_number="9900000004" + , routing_number="021000021" + , name="Foo").save() + + good_card().associate_to_customer(good_card_no_bank) + good_card().associate_to_customer(good_card_good_bank) + good_card().associate_to_customer(good_card_bad_bank) + + bad_card().associate_to_customer(bad_card_no_bank) + bad_card().associate_to_customer(bad_card_good_bank) + bad_card().associate_to_customer(bad_card_bad_bank) + + good_bank().associate_to_customer(no_card_good_bank) + good_bank().associate_to_customer(good_card_good_bank) + good_bank().associate_to_customer(bad_card_good_bank) + + bad_bank().associate_to_customer(no_card_bad_bank) + bad_bank().associate_to_customer(good_card_bad_bank) + bad_bank().associate_to_customer(bad_card_bad_bank) + + customers = [ no_card_no_bank + , no_card_good_bank + , no_card_bad_bank + , good_card_no_bank + , good_card_good_bank + , good_card_bad_bank + , bad_card_no_bank + , bad_card_good_bank + , bad_card_bad_bank + ] + open('balanced.cache', 'w+').write('\n'.join([customer.href for customer in customers])) + + +print "Updating DB ..." + +participants = db.all("SELECT p.*::participants from participants p " + "WHERE balanced_customer_href IS NOT NULL") + +for participant in participants: + + customer = None + card = participant.last_bill_result + bank = participant.last_ach_result + + if card is None: + if bank is None: + customer = no_card_no_bank + elif bank == '': + customer = no_card_good_bank + elif bank > '': + customer = no_card_bad_bank + elif card == '': + if bank is None: + customer = good_card_no_bank + elif bank == '': + customer = good_card_good_bank + elif bank > '': + customer = good_card_bad_bank + elif card > '': + if bank is None: + customer = bad_card_no_bank + elif bank == '': + customer = bad_card_good_bank + elif bank > '': + customer = bad_card_bad_bank + + print customer.href + + db.run( "UPDATE participants SET balanced_customer_href=%s WHERE id=%s" + , (customer.href, participant.id)) + +print len(participants) diff --git a/branch.sql b/branch.sql new file mode 100644 index 0000000000..f54edeeb3e --- /dev/null +++ b/branch.sql @@ -0,0 +1,19 @@ +BEGIN; + + ALTER TABLE paydays ADD COLUMN stage integer DEFAULT 0; + ALTER TABLE participants DROP COLUMN pending; + + CREATE TYPE exchange_status AS ENUM ('pre', 'pending', 'failed', 'succeeded'); + ALTER TABLE exchanges ADD COLUMN status exchange_status; + + UPDATE participants + SET last_ach_result = NULL + WHERE last_ach_result = 'NoResultFound()'; + UPDATE participants + SET last_bill_result = NULL + WHERE last_bill_result = 'NoResultFound()'; + + INSERT INTO tips (ctime, tipper, tippee, amount) + SELECT ctime, tipper, tippee, 0 FROM tips WHERE id = 46266; + +END; diff --git a/gittip/billing/exchanges.py b/gittip/billing/exchanges.py new file mode 100644 index 0000000000..a5750d93ef --- /dev/null +++ b/gittip/billing/exchanges.py @@ -0,0 +1,372 @@ +"""Functions for moving money between Gittip and the outside world. +""" +from __future__ import unicode_literals + +from decimal import Decimal, ROUND_UP + +import balanced + +from aspen import log +from aspen.utils import typecheck +from gittip.exceptions import NegativeBalance, NoBalancedCustomerHref, NotWhitelisted +from gittip.models import check_db +from gittip.models.participant import Participant + + +# https://docs.balancedpayments.com/1.1/api/customers/ +CUSTOMER_LINKS = { + "customers.bank_accounts": "/customers/{customers.id}/bank_accounts", + "customers.card_holds": "/customers/{customers.id}/card_holds", + "customers.cards": "/customers/{customers.id}/cards", + "customers.credits": "/customers/{customers.id}/credits", + "customers.debits": "/customers/{customers.id}/debits", + "customers.destination": "/resources/{customers.destination}", + "customers.disputes": "/customers/{customers.id}/disputes", + "customers.external_accounts": "/customers/{customers.id}/external_accounts", + "customers.orders": "/customers/{customers.id}/orders", + "customers.refunds": "/customers/{customers.id}/refunds", + "customers.reversals": "/customers/{customers.id}/reversals", + "customers.source": "/resources/{customers.source}", + "customers.transactions": "/customers/{customers.id}/transactions" +} + + +def customer_from_href(href): + """This functions "manually" builds a minimal Customer instance. + """ + id = href.rsplit('/', 1)[1] + d = {'href': href, 'id': id, 'links': {}, 'meta': {}} + return balanced.Customer(customers=[d], links=CUSTOMER_LINKS) + + +# Balanced has a $0.50 minimum. We go even higher to avoid onerous +# per-transaction fees. See: +# https://github.com/gittip/www.gittip.com/issues/167 + +MINIMUM_CHARGE = Decimal("9.41") +MINIMUM_CREDIT = Decimal("10.00") + +FEE_CHARGE = ( Decimal("0.30") # $0.30 + , Decimal("0.029") # 2.9% + ) +FEE_CREDIT = Decimal("0.00") # Balanced doesn't actually charge us for this, + # because we were in the door early enough. + + +def upcharge(amount): + """Given an amount, return a higher amount and the difference. + """ + typecheck(amount, Decimal) + charge_amount = (amount + FEE_CHARGE[0]) / (1 - FEE_CHARGE[1]) + charge_amount = charge_amount.quantize(FEE_CHARGE[0], rounding=ROUND_UP) + return charge_amount, charge_amount - amount + +assert upcharge(MINIMUM_CHARGE) == (Decimal('10.00'), Decimal('0.59')) + + +def skim_credit(amount): + """Given an amount, return a lower amount and the difference. + """ + typecheck(amount, Decimal) + return amount - FEE_CREDIT, FEE_CREDIT + + +def repr_exception(e): + if isinstance(e, balanced.exc.HTTPError): + return '%s %s, %s' % (e.status_code, e.status, e.description) + else: + return repr(e) + + +def ach_credit(db, participant, withhold, minimum_credit=MINIMUM_CREDIT): + + # Compute the amount to credit them. + # ================================== + # Leave money in Gittip to cover their obligations next week (as these + # currently stand). + + balance = participant.balance + assert balance is not None, balance # sanity check + amount = balance - withhold + + # Do some last-minute checks. + # =========================== + + if amount <= 0: + return # Participant not owed anything. + + if amount < minimum_credit: + also_log = "" + if withhold > 0: + also_log = " ($%s balance - $%s in obligations)" + also_log %= (balance, withhold) + log("Minimum payout is $%s. %s is only due $%s%s." + % (minimum_credit, participant.username, amount, also_log)) + return # Participant owed too little. + + if not participant.is_whitelisted: + raise NotWhitelisted # Participant not trusted. + + balanced_customer_href = participant.balanced_customer_href + if balanced_customer_href is None: + log("%s has no balanced_customer_href." + % participant.username) + raise NoBalancedCustomerHref # not in Balanced + + + # Do final calculations. + # ====================== + + credit_amount, fee = skim_credit(amount) + cents = credit_amount * 100 + + if withhold > 0: + also_log = "$%s balance - $%s in obligations" + also_log %= (balance, withhold) + else: + also_log = "$%s" % amount + msg = "Crediting %s %d cents (%s - $%s fee = $%s) on Balanced ... " + msg %= (participant.username, cents, also_log, fee, credit_amount) + + + # Try to dance with Balanced. + # =========================== + + e_id = record_exchange(db, 'ach', -credit_amount, fee, participant, 'pre') + meta = dict(exchange_id=e_id, participant_id=participant.id) + try: + customer = customer_from_href(balanced_customer_href) + ba = customer.bank_accounts.one() + ba.credit(amount=cents, description=participant.username, meta=meta) + record_exchange_result(db, e_id, 'pending', None, participant) + log(msg + "succeeded.") + error = "" + except Exception as e: + error = repr_exception(e) + record_exchange_result(db, e_id, 'failed', error, participant) + log(msg + "failed: %s" % error) + + return error + + +def create_card_hold(db, participant, amount): + """Create a hold on the participant's credit card. + + Amount should be the nominal amount. We'll compute Gittip's fee below + this function and add it to amount to end up with charge_amount. + + """ + typecheck(amount, Decimal) + + username = participant.username + balanced_customer_href = participant.balanced_customer_href + + typecheck( username, unicode + , balanced_customer_href, (unicode, None) + ) + + + # Perform some last-minute checks. + # ================================ + + if balanced_customer_href is None: + raise NoBalancedCustomerHref # Participant has no funding source. + + if participant.is_suspicious is not False: + raise NotWhitelisted # Participant not trusted. + + + # Go to Balanced. + # =============== + + cents, amount_str, charge_amount, fee = _prep_hit(amount) + msg = "Holding " + amount_str + " on Balanced for " + username + " ... " + + hold = None + try: + card = customer_from_href(balanced_customer_href).cards.one() + hold = card.hold( amount=cents + , description=username + , meta=dict(participant_id=participant.id, state='new') + ) + log(msg + "succeeded.") + error = "" + except Exception as e: + error = repr_exception(e) + log(msg + "failed: %s" % error) + propagate_exchange(db, participant, 'bill', error, 0) + + return hold, error + + +def capture_card_hold(db, participant, amount, hold): + """Capture the previously created hold on the participant's credit card. + """ + typecheck( hold, balanced.CardHold + , amount, Decimal + ) + + username = participant.username + assert participant.id == int(hold.meta['participant_id']) + + cents, amount_str, charge_amount, fee = _prep_hit(amount) + amount = charge_amount - fee # account for possible rounding + e_id = record_exchange(db, 'bill', amount, fee, participant, 'pre') + + meta = dict(participant_id=participant.id, exchange_id=e_id) + try: + hold.capture(amount=cents, description=username, meta=meta) + record_exchange_result(db, e_id, 'succeeded', None, participant) + except Exception as e: + error = repr_exception(e) + record_exchange_result(db, e_id, 'failed', error, participant) + raise + + hold.meta['state'] = 'captured' + hold.save() + + log("Captured " + amount_str + " on Balanced for " + username) + + +def cancel_card_hold(hold): + """Cancel the previously created hold on the participant's credit card. + """ + hold.is_void = True + hold.meta['state'] = 'cancelled' + hold.save() + + +def _prep_hit(unrounded): + """Takes an amount in dollars. Returns cents, etc. + + cents This is passed to the payment processor charge API. This is + the value that is actually charged to the participant. It's + an int. + amount_str A detailed string representation of the amount. + upcharged Decimal dollar equivalent to `cents'. + fee Decimal dollar amount of the fee portion of `upcharged'. + + The latter two end up in the db in a couple places via record_exchange. + + """ + also_log = '' + rounded = unrounded + if unrounded < MINIMUM_CHARGE: + rounded = MINIMUM_CHARGE # per github/#167 + also_log = ' [rounded up from $%s]' % unrounded + + upcharged, fee = upcharge(rounded) + cents = int(upcharged * 100) + + amount_str = "%d cents ($%s%s + $%s fee = $%s)" + amount_str %= cents, rounded, also_log, fee, upcharged + + return cents, amount_str, upcharged, fee + + +def record_exchange(db, kind, amount, fee, participant, status): + """Given a Bunch of Stuff, return None. + + Records in the exchanges table have these characteristics: + + amount It's negative for credits (representing an outflow from + Gittip to you) and positive for charges. + The sign is how we differentiate the two in, e.g., the + history page. + + fee The payment processor's fee. It's always positive. + + """ + + with db.get_cursor() as cursor: + + exchange_id = cursor.one(""" + INSERT INTO exchanges + (amount, fee, participant, status) + VALUES (%s, %s, %s, %s) + RETURNING id + """, (amount, fee, participant.username, status)) + + if amount < 0: + amount -= fee + propagate_exchange(cursor, participant, kind, '', amount) + + return exchange_id + + +def record_exchange_result(db, exchange_id, status, error, participant): + """Updates the status of an exchange. + """ + with db.get_cursor() as cursor: + amount, fee, username = cursor.one(""" + UPDATE exchanges + SET status=%(status)s + , note=%(error)s + WHERE id=%(exchange_id)s + AND status <> %(status)s + RETURNING amount, fee, participant + """, locals()) + assert participant.username == username + + if amount < 0: + amount -= fee + amount = amount if status == 'failed' else 0 + propagate_exchange(cursor, participant, 'ach', error, -amount) + else: + amount = amount if status == 'succeeded' else 0 + propagate_exchange(cursor, participant, 'bill', error, amount) + + +def propagate_exchange(cursor, participant, kind, error, amount): + """Propagates an exchange to the participant's balance. + """ + column = 'last_%s_result' % kind + error = None if error == 'NoResultFound()' else (error or '') + new_balance = cursor.one(""" + UPDATE participants + SET {0}=%s + , balance=(balance + %s) + WHERE id=%s + RETURNING balance + """.format(column), (error, amount, participant.id)) + + if amount < 0 and new_balance < 0: + raise NegativeBalance + + if hasattr(participant, 'set_attributes'): + participant.set_attributes(**{'balance': new_balance, column: error}) + + +def sync_with_balanced(db): + """We can get out of sync with Balanced if record_exchange_result was + interrupted or wasn't called. This is where we fix that. + """ + check_db(db) + exchanges = db.all(""" + SELECT * + FROM exchanges + WHERE status = 'pre' + """) + meta_exchange_id = balanced.Transaction.f.meta.exchange_id + for e in exchanges: + p = Participant.from_username(e.participant) + cls = balanced.Debit if e.amount > 0 else balanced.Credit + transactions = cls.query.filter(meta_exchange_id == e.id).all() + assert len(transactions) < 2 + if transactions: + t = transactions[0] + error = t.failure_reason + status = t.status + assert (not error) ^ (status == 'failed') + record_exchange_result(db, e.id, status, error, p) + else: + # The exchange didn't happen, remove it + db.run("DELETE FROM exchanges WHERE id=%s", (e.id,)) + # and restore the participant's balance if it was a credit + if e.amount < 0: + db.run(""" + UPDATE participants + SET balance=(balance + %s) + WHERE id=%s + """, (-e.amount + e.fee, p.id)) + check_db(db) diff --git a/gittip/billing/payday.py b/gittip/billing/payday.py index bfb026cc8b..1d8450dd16 100644 --- a/gittip/billing/payday.py +++ b/gittip/billing/payday.py @@ -1,90 +1,32 @@ -"""This is Gittip's payday algorithm. I would appreciate feedback on it. - -The payday algorithm is designed to be crash-resistant and parallelizable, but -it's not eventually consistent in the strict sense (iinm) because consistency -is always apodeictically knowable. +"""This is Gittip's payday algorithm. Exchanges (moving money between Gittip and the outside world) and transfers (moving money amongst Gittip users) happen within an isolated event called -payday. This event has duration (it's not punctiliar). It is started -transactionally, and it ends transactionally, and inside of it, exchanges and -transfers happen transactionally (though the link between our db and our -processor's db could be tightened up; see #213). Exchanges immediately affect -the participant's balance, but transfers accrue against a "pending" column in -the database. Once the payday event has completed successfully, it ends with -the pending column being applied to the balance column and reset to NULL in a -single transaction. +payday. This event has duration (it's not punctiliar). + +Payday is designed to be crash-resistant. Everything that can be rolled back +happens inside a single DB transaction. Exchanges cannot be rolled back, so they +immediately affect the participant's balance. """ from __future__ import unicode_literals -import sys -from decimal import Decimal, ROUND_UP +import itertools + +from balanced import CardHold -import balanced import aspen.utils from aspen import log -from aspen.utils import typecheck -from gittip.models.participant import Participant +from gittip.billing.exchanges import ( + ach_credit, cancel_card_hold, capture_card_hold, create_card_hold, upcharge +) from gittip.exceptions import NegativeBalance +from gittip.models import check_db from psycopg2 import IntegrityError -# Set fees and minimums. -# ====================== -# Balanced has a $0.50 minimum. We go even higher to avoid onerous -# per-transaction fees. See: -# https://github.com/gittip/www.gittip.com/issues/167 XXX I should maybe -# compute this using *ahem* math. - -FEE_CHARGE = ( Decimal("0.30") # $0.30 - , Decimal("0.029") # 2.9% - ) -FEE_CREDIT = Decimal("0.00") # Balanced doesn't actually charge us for this, - # because we were in the door early enough. - -MINIMUM_CHARGE = Decimal("9.41") -MINIMUM_CREDIT = Decimal("10.00") - - -def upcharge(amount): - """Given an amount, return a higher amount and the difference. - """ - typecheck(amount, Decimal) - charge_amount = (amount + FEE_CHARGE[0]) / (1 - FEE_CHARGE[1]) - charge_amount = charge_amount.quantize(FEE_CHARGE[0], rounding=ROUND_UP) - return charge_amount, charge_amount - amount - -def skim_credit(amount): - """Given an amount, return a lower amount and the difference. - """ - typecheck(amount, Decimal) - return amount - FEE_CREDIT, FEE_CREDIT - -assert upcharge(MINIMUM_CHARGE) == (Decimal('10.00'), Decimal('0.59')) - - -def is_whitelisted(participant): - """Given a dict, return bool, possibly logging. - - We only perform credit card charges and bank deposits for whitelisted - participants. We don't even include is_suspicious participants in the - initial SELECT, so we should never see one here. - - """ - assert participant.is_suspicious is not True, participant.username - if participant.is_suspicious is None: - log("UNREVIEWED: %s" % participant.username) - return False - return True - - class NoPayday(Exception): - def __str__(self): - return "No payday found where one was expected." - - -LOOP_PAYIN, LOOP_PACHINKO, LOOP_PAYOUT = range(3) + __str__ = lambda self: "No payday found where one was expected." class Payday(object): @@ -95,39 +37,56 @@ class Payday(object): want to use their balance at the start of Payday. Balance changes should be atomic globally per-Payday. - """ + Here's the call structure of the Payday.run method: + + run + payin + prepare + create_card_holds + transfer_tips + transfer_takes + settle_card_holds + update_balances + take_over_balances + payout + update_stats + update_receiving_amounts + end - def __init__(self, db): - """Takes a postgres.Postgres instance. - """ - self.db = db + """ - def genparticipants(self, ts_start, loop): - """Generator to yield participants with extra info. + @classmethod + def start(cls): + """Try to start a new Payday. - The extra info varies depending on which loop we're in: tips/total for - payin and payout, takes for pachinko. + If there is a Payday that hasn't finished yet, then the UNIQUE + constraint on ts_end will kick in and notify us of that. In that case + we load the existing Payday and work on it some more. We use the start + time of the current Payday to synchronize our work. """ - teams_only = (loop == LOOP_PACHINKO) - for participant in self.get_participants(ts_start, teams_only): - if loop == LOOP_PAYIN: - extra = participant.get_tips_and_total(for_payday=ts_start) - elif loop == LOOP_PACHINKO: - extra = participant.get_takes(for_payday=ts_start) - elif loop == LOOP_PAYOUT: - - # On the payout loop we want to use the total obligations they - # have for next week, and if we pass a non-False for_payday to - # get_tips_and_total then we only get unfulfilled tips from - # prior to that timestamp, which is none of them by definition - # at this point since we just recently finished payin. - - extra = participant.get_tips_and_total() - else: - raise Exception # sanity check - yield(participant, extra) + try: + d = cls.db.one(""" + INSERT INTO paydays DEFAULT VALUES + RETURNING id, (ts_start AT TIME ZONE 'UTC') AS ts_start, stage + """, back_as=dict) + log("Starting a new payday.") + except IntegrityError: # Collision, we have a Payday already. + d = cls.db.one(""" + SELECT id, (ts_start AT TIME ZONE 'UTC') AS ts_start, stage + FROM paydays + WHERE ts_end='1970-01-01T00:00:00+00'::timestamptz + """, back_as=dict) + log("Picking up with an existing payday.") + + d['ts_start'] = d['ts_start'].replace(tzinfo=aspen.utils.utc) + + log("Payday started at %s." % d['ts_start']) + + payday = Payday() + payday.__dict__.update(d) + return payday def run(self): @@ -142,225 +101,450 @@ def run(self): _start = aspen.utils.utcnow() log("Greetings, program! It's PAYDAY!!!!") - ts_start = self.start() - self.zero_out_pending(ts_start) - self.payin(ts_start, self.genparticipants(ts_start, loop=LOOP_PAYIN)) - self.move_pending_to_balance_for_teams() - self.pachinko(ts_start, self.genparticipants(ts_start, loop=LOOP_PACHINKO)) - self.clear_pending_to_balance() - self.payout(ts_start, self.genparticipants(ts_start, loop=LOOP_PAYOUT)) - self.update_stats(ts_start) - self.update_receiving_amounts() + if self.stage < 1: + self.payin() + self.mark_stage_done() + if self.stage < 2: + self.payout() + self.mark_stage_done() + if self.stage < 3: + self.update_stats() + self.update_receiving_amounts() + self.mark_stage_done() self.end() - self.db.self_check() - _end = aspen.utils.utcnow() _delta = _end - _start - fmt_past = "Script ran for {age} (%s)." % _delta + fmt_past = "Script ran for %%(age)s (%s)." % _delta log(aspen.utils.to_age(_start, fmt_past=fmt_past)) - def start(self): - """Try to start a new Payday. - - If there is a Payday that hasn't finished yet, then the UNIQUE - constraint on ts_end will kick in and notify us of that. In that case - we load the existing Payday and work on it some more. We use the start - time of the current Payday to synchronize our work. - + def payin(self): + """The first stage of payday where we charge credit cards and transfer + money internally between participants. """ - try: - ts_start = self.db.one("INSERT INTO paydays DEFAULT VALUES " - "RETURNING ts_start") - log("Starting a new payday.") - except IntegrityError: # Collision, we have a Payday already. - ts_start = self.db.one(""" + with self.db.get_cursor() as cursor: + self.prepare(cursor, self.ts_start) + holds = self.create_card_holds(cursor) + self.transfer_tips(cursor) + self.transfer_takes(cursor, self.ts_start) + transfers = cursor.all(""" + SELECT * FROM transfers WHERE "timestamp" > %s + """, (self.ts_start,)) + try: + self.settle_card_holds(cursor, holds) + self.update_balances(cursor) + check_db(cursor) + except: + # Dump transfers for debugging + import csv + from time import time + with open('%s_transfers.csv' % time(), 'wb') as f: + csv.writer(f).writerows(transfers) + raise + self.take_over_balances() + + + @staticmethod + def prepare(cursor, ts_start): + """Prepare the DB: we need temporary tables with indexes and triggers. + """ + cursor.run(""" + + -- Create the necessary temporary tables and indexes + + CREATE TEMPORARY TABLE payday_participants ON COMMIT DROP AS + SELECT id + , username + , claimed_time + , balance AS old_balance + , balance AS new_balance + , balanced_customer_href + , last_bill_result + , is_suspicious + , goal + , false AS card_hold_ok + FROM participants + WHERE is_suspicious IS NOT true + AND claimed_time < %(ts_start)s + ORDER BY claimed_time; + + CREATE UNIQUE INDEX ON payday_participants (id); + CREATE UNIQUE INDEX ON payday_participants (username); + + CREATE TEMPORARY TABLE payday_transfers ON COMMIT DROP AS + SELECT * + FROM transfers t + WHERE t.timestamp > %(ts_start)s; + + CREATE TEMPORARY TABLE payday_tips ON COMMIT DROP AS + SELECT tipper, tippee, amount + FROM ( SELECT DISTINCT ON (tipper, tippee) * + FROM tips + WHERE mtime < %(ts_start)s + ORDER BY tipper, tippee, mtime DESC + ) t + JOIN payday_participants p ON p.username = t.tipper + JOIN payday_participants p2 ON p2.username = t.tippee + WHERE t.amount > 0 + AND (p2.goal IS NULL or p2.goal >= 0) + AND ( SELECT id + FROM payday_transfers t2 + WHERE t.tipper = t2.tipper + AND t.tippee = t2.tippee + AND context = 'tip' + ) IS NULL + ORDER BY p.claimed_time ASC, t.ctime ASC; + + CREATE INDEX ON payday_tips (tipper); + CREATE INDEX ON payday_tips (tippee); + ALTER TABLE payday_tips ADD COLUMN is_funded boolean; + + ALTER TABLE payday_participants ADD COLUMN giving_today numeric(35,2); + UPDATE payday_participants + SET giving_today = COALESCE(( + SELECT sum(amount) + FROM payday_tips + WHERE tipper = username + ), 0); + + CREATE TEMPORARY TABLE payday_takes + ( team text + , member text + , amount numeric(35,2) + ) ON COMMIT DROP; + + + -- Prepare a statement that makes and records a transfer + + CREATE OR REPLACE FUNCTION transfer(text, text, numeric, context_type) + RETURNS void AS $$ + BEGIN + IF ($3 = 0) THEN RETURN; END IF; + UPDATE payday_participants + SET new_balance = (new_balance - $3) + WHERE username = $1; + UPDATE payday_participants + SET new_balance = (new_balance + $3) + WHERE username = $2; + INSERT INTO transfers + (tipper, tippee, amount, context) + VALUES ( ( SELECT p.username + FROM participants p + JOIN payday_participants p2 ON p.id = p2.id + WHERE p2.username = $1 ) + , ( SELECT p.username + FROM participants p + JOIN payday_participants p2 ON p.id = p2.id + WHERE p2.username = $2 ) + , $3 + , $4 + ); + END; + $$ LANGUAGE plpgsql; + + + -- Create a trigger to process tips + + CREATE OR REPLACE FUNCTION process_tip() RETURNS trigger AS $$ + DECLARE + tipper payday_participants; + BEGIN + tipper := ( + SELECT p.*::payday_participants + FROM payday_participants p + WHERE username = NEW.tipper + ); + IF (NEW.amount <= tipper.new_balance OR tipper.card_hold_ok) THEN + EXECUTE transfer(NEW.tipper, NEW.tippee, NEW.amount, 'tip'); + RETURN NEW; + END IF; + RETURN NULL; + END; + $$ LANGUAGE plpgsql; + + CREATE TRIGGER process_tip BEFORE UPDATE OF is_funded ON payday_tips + FOR EACH ROW + WHEN (NEW.is_funded IS true AND OLD.is_funded IS NOT true) + EXECUTE PROCEDURE process_tip(); + + + -- Create a trigger to process takes + + CREATE OR REPLACE FUNCTION process_take() RETURNS trigger AS $$ + DECLARE + actual_amount numeric(35,2); + team_balance numeric(35,2); + BEGIN + team_balance := ( + SELECT new_balance + FROM payday_participants + WHERE username = NEW.team + ); + IF (team_balance <= 0) THEN RETURN NULL; END IF; + actual_amount := NEW.amount; + IF (team_balance < NEW.amount) THEN + actual_amount := team_balance; + END IF; + EXECUTE transfer(NEW.team, NEW.member, actual_amount, 'take'); + RETURN NULL; + END; + $$ LANGUAGE plpgsql; + + CREATE TRIGGER process_take AFTER INSERT ON payday_takes + FOR EACH ROW EXECUTE PROCEDURE process_take(); + + + -- Save the stats we already have + + UPDATE paydays + SET nparticipants = (SELECT count(*) FROM payday_participants) + , ncc_missing = ( + SELECT count(*) + FROM payday_participants + WHERE old_balance < giving_today + AND ( balanced_customer_href IS NULL + OR + last_bill_result IS NULL + ) + ) + WHERE ts_end='1970-01-01T00:00:00+00'::timestamptz; + + """, dict(ts_start=ts_start)) + log('Prepared the DB.') + + + @staticmethod + def fetch_card_holds(participant_ids): + holds = {} + for hold in CardHold.query.filter(CardHold.f.meta.state == 'new'): + state = 'new' + if hold.failure_reason: + state = 'failed' + elif hold.voided_at: + state = 'cancelled' + elif getattr(hold, 'debit_href', None): + state = 'captured' + if state != 'new': + hold.meta['state'] = state + hold.save() + continue + p_id = int(hold.meta['participant_id']) + if p_id in participant_ids: + holds[p_id] = hold + else: + cancel_card_hold(hold) + return holds - SELECT ts_start - FROM paydays - WHERE ts_end='1970-01-01T00:00:00+00'::timestamptz - """) - log("Picking up with an existing payday.") + def create_card_holds(self, cursor): - log("Payday started at %s." % ts_start) - return ts_start + # Get the list of participants to create card holds for + participants = cursor.all(""" + SELECT * + FROM payday_participants + WHERE old_balance < giving_today + AND balanced_customer_href IS NOT NULL + AND last_bill_result IS NOT NULL + AND is_suspicious IS false + """) + if not participants: + return {} + + # Fetch existing holds + participant_ids = set(p.id for p in participants) + holds = self.fetch_card_holds(participant_ids) + + # Create new holds and check amounts of existing ones + for p in participants: + amount = p.giving_today + if p.old_balance < 0: + amount -= p.old_balance + if p.id in holds: + charge_amount = upcharge(amount)[0] + if holds[p.id].amount >= charge_amount * 100: + continue + else: + # The amount is too low, cancel the hold and make a new one + cancel_card_hold(holds.pop(p.id)) + hold, error = create_card_hold(self.db, p, amount) + if error: + self.mark_charge_failed(cursor) + else: + holds[p.id] = hold + # Update the values of card_hold_ok in our temporary table + if not holds: + return {} + cursor.run(""" + UPDATE payday_participants p + SET card_hold_ok = true + WHERE p.id IN %s + """, (tuple(holds.keys()),)) - def zero_out_pending(self, ts_start): - """Given a timestamp, zero out the pending column. + return holds - We keep track of balance changes as a result of Payday in the pending - column, and then move them over to the balance column in one big - transaction at the end of Payday. - """ - START_PENDING = """\ + @staticmethod + def transfer_tips(cursor): + cursor.run(""" - UPDATE participants - SET pending=0.00 - WHERE pending IS NULL - AND claimed_time < %s + UPDATE payday_tips t + SET is_funded = true + FROM payday_participants p + WHERE p.username = t.tipper + AND p.card_hold_ok; - """ - self.db.run(START_PENDING, (ts_start,)) - log("Zeroed out the pending column.") - return None + UPDATE payday_tips t + SET is_funded = true + WHERE is_funded IS NOT true; + """) - def get_participants(self, ts_start, teams_only=False): - """Given a timestamp, return a list of participants dicts. - """ - PARTICIPANTS = """\ - SELECT participants.*::participants - FROM participants - WHERE claimed_time IS NOT NULL - AND claimed_time < %s - AND is_suspicious IS NOT true - {} - ORDER BY claimed_time ASC - """.format(teams_only and "AND number = 'plural'" or '') - participants = self.db.all(PARTICIPANTS, (ts_start,)) - log("Fetched participants.") - return participants - - - def payin(self, ts_start, participants): - """Given a datetime and an iterator, do the payin side of Payday. - """ - i = 0 - log("Starting payin loop.") - for i, (participant, (tips, total)) in enumerate(participants, start=1): - if i % 100 == 0: - log("Payin done for %d participants." % i) - self.charge_and_or_transfer(ts_start, participant, tips, total) - log("Did payin for %d participants." % i) + @staticmethod + def transfer_takes(cursor, ts_start): + cursor.run(""" + + INSERT INTO payday_takes + SELECT team, member, amount + FROM ( SELECT DISTINCT ON (team, member) + team, member, amount, ctime + FROM takes + WHERE mtime < %(ts_start)s + ORDER BY team, member, mtime DESC + ) t + WHERE t.amount > 0 + AND t.team IN (SELECT username FROM payday_participants) + AND t.member IN (SELECT username FROM payday_participants) + AND ( SELECT id + FROM payday_transfers t2 + WHERE t.team = t2.tipper + AND t.member = t2.tippee + AND context = 'take' + ) IS NULL + ORDER BY t.team, t.ctime DESC; + + """, dict(ts_start=ts_start)) + + + def settle_card_holds(self, cursor, holds): + participants = cursor.all(""" + SELECT * + FROM payday_participants + WHERE new_balance < 0 + """) - def pachinko(self, ts_start, participants): - i = 0 - for i, (participant, takes) in enumerate(participants, start=1): - if i % 100 == 0: - log("Pachinko done for %d participants." % i) - - available = participant.balance - log("Pachinko out from %s with $%s." % ( participant.username - , available - )) - - def tip(tippee, amount): - tip = {} - tip['tipper'] = participant.username - tip['tippee'] = tippee - tip['amount'] = amount - tip['claimed_time'] = ts_start - self.tip( participant - , tip - , ts_start - , pachinko=True - ) - - for take in takes: - amount = min(take['amount'], available) - available -= amount - tip(take['member'], amount) - if available == 0: - break - - log("Did pachinko for %d participants." % i) - - - def payout(self, ts_start, participants): - """Given a datetime and an iterator, do the payout side of Payday. - """ + # Capture holds to bring balances back up to (at least) zero i = 0 - log("Starting payout loop.") - for i, (participant, (tips, total)) in enumerate(participants, start=1): - if i % 100 == 0: - log("Payout done for %d participants." % i) - self.ach_credit(ts_start, participant, tips, total) - log("Did payout for %d participants." % i) - + for p in participants: + if p.id in holds: + amount = -p.new_balance + capture_card_hold(self.db, p, amount, holds.pop(p.id)) + i += 1 + log("Captured %i card holds." % i) + + # Cancel the remaining holds + for hold in holds.values(): + cancel_card_hold(hold) + log("Canceled %i card holds." % len(holds)) + + + @staticmethod + def update_balances(cursor): + participants = cursor.all(""" + + UPDATE participants p + SET balance = (balance + p2.new_balance - p2.old_balance) + FROM payday_participants p2 + WHERE p.id = p2.id + AND p2.new_balance <> p2.old_balance + RETURNING p.id + , p.username + , balance AS new_balance + , ( SELECT balance + FROM participants p3 + WHERE p3.id = p.id + ) AS cur_balance; - def charge_and_or_transfer(self, ts_start, participant, tips, total): - """Given one participant record, pay their day. + """) + # Check that balances aren't becoming (more) negative + for p in participants: + if p.new_balance < 0 and p.new_balance < p.cur_balance: + log(p) + raise NegativeBalance() + log("Updated the balances of %i participants." % len(participants)) - Charge each participants' credit card if needed before transfering - money between Gittip accounts. + def take_over_balances(self): + """If an account that receives money is taken over during payin we need + to transfer the balance to the absorbing account. """ - short = total - participant.balance - if short > 0: - - # The participant's Gittip account is short the amount needed to - # fund all their tips. Let's try pulling in money from their credit - # card. If their credit card fails we'll forge ahead, in case they - # have a positive Gittip balance already that can be used to fund - # at least *some* tips. The charge method will have set - # last_bill_result to a non-empty string if the card did fail. - - self.charge(participant, short) - - nsuccessful_tips = 0 - for tip in tips: - result = self.tip(participant, tip, ts_start) - if result >= 0: - nsuccessful_tips += result - else: - break - - self.mark_participant() + for i in itertools.count(): + if i > 10: + raise Exception('possible infinite loop') + count = self.db.one(""" + DROP TABLE IF EXISTS temp; + CREATE TEMPORARY TABLE temp AS + SELECT archived_as, absorbed_by, balance AS archived_balance + FROM absorptions a + JOIN participants p ON a.archived_as = p.username + WHERE balance > 0; - def move_pending_to_balance_for_teams(self): - """Transfer pending into balance for teams. + SELECT count(*) FROM temp; - We do this because debit_participant operates against balance, not - pending. This is because credit card charges go directly into balance - on the first (payin) loop. - - """ - self.db.run("""\ - - UPDATE participants - SET balance = (balance + pending) - , pending = 0 - WHERE pending IS NOT NULL - AND number='plural' + """) + if not count: + break + self.db.run(""" - """) - # "Moved" instead of "cleared" because we don't also set to null. - log("Moved pending to balance for teams. Ready for pachinko.") + INSERT INTO transfers (tipper, tippee, amount, context) + SELECT archived_as, absorbed_by, archived_balance, 'take-over' + FROM temp; + UPDATE participants + SET balance = (balance - archived_balance) + FROM temp + WHERE username = archived_as; - def clear_pending_to_balance(self): - """Transfer pending into balance, setting pending to NULL. + UPDATE participants + SET balance = (balance + archived_balance) + FROM temp + WHERE username = absorbed_by; - Any users that were created while the payin loop was running will have - pending NULL (the default). If we try to add that to balance we'll get - a NULL (0.0 + NULL = NULL), and balance has a NOT NULL constraint. - Hence the where clause. See: + """) - https://github.com/gittip/www.gittip.com/issues/170 + def payout(self): + """This is the second stage of payday in which we send money out to the + bank accounts of participants. """ - - self.db.run("""\ - - UPDATE participants - SET balance = (balance + pending) - , pending = NULL - WHERE pending IS NOT NULL - + i = 0 + log("Starting payout loop.") + participants = self.db.all(""" + SELECT p.*::participants + FROM participants p + WHERE balance > 0 + AND balanced_customer_href IS NOT NULL + AND last_ach_result IS NOT NULL """) - # "Cleared" instead of "moved because we also set to null. - log("Cleared pending to balance. Ready for payouts.") + for i, participant in enumerate(participants, start=1): + if participant.is_suspicious is None: + log("UNREVIEWED: %s" % participant.username) + continue + withhold = participant.giving + participant.pledging + error = ach_credit(self.db, participant, withhold) + if error: + self.mark_ach_failed() + log("Did payout for %d participants." % i) + self.db.self_check() + log("Checked the DB.") - def update_stats(self, ts_start): + def update_stats(self): self.db.run("""\ WITH our_transfers AS ( @@ -415,10 +599,11 @@ def update_stats(self, ts_start): SELECT COALESCE(sum(amount + fee), 0) FROM our_charges ) - , charge_fees_volume = (SELECT sum(fee) FROM our_charges) + , charge_fees_volume = (SELECT COALESCE(sum(fee), 0) FROM our_charges) WHERE ts_end='1970-01-01T00:00:00+00'::timestamptz - """, {'ts_start': ts_start}) + """, {'ts_start': self.ts_start}) + log("Updated payday stats.") def update_receiving_amounts(self): @@ -440,470 +625,37 @@ def update_receiving_amounts(self): """ with self.db.get_cursor() as cursor: cursor.execute(UPDATE) + log("Updated receiving amounts.") + def end(self): - self.db.one("""\ + self.ts_end = self.db.one("""\ UPDATE paydays SET ts_end=now() WHERE ts_end='1970-01-01T00:00:00+00'::timestamptz - RETURNING id - - """, default=NoPayday) - - - # Move money between Gittip participants. - # ======================================= - - def tip(self, participant, tip, ts_start, pachinko=False): - """Given dict, dict, and datetime, log and return int. - - Return values: - - | 0 if no valid tip available or tip has not been claimed - | 1 if tip is valid - | -1 if transfer fails and we cannot continue - - """ - msg = "$%s from %s to %s%s." - msg %= ( tip['amount'] - , participant.username - , tip['tippee'] - , " (pachinko)" if pachinko else "" - ) - - if tip['amount'] == 0: - - # The tips table contains a record for every time you click a tip - # button. So if you click $0.25 then $3.00 then $0.00, that - # generates three entries. We are looking at the last entry here, - # and it's zero. - - return 0 - - claimed_time = tip['claimed_time'] - if claimed_time is None or claimed_time > ts_start: - - # Gittip is opt-in. We're only going to collect money on a person's - # behalf if they opted-in by claiming their account before the - # start of this payday. - - log("SKIPPED: %s" % msg) - return 0 - - if not self.transfer(participant.username, tip['tippee'], \ - tip['amount'], pachinko=pachinko): - - # The transfer failed due to a lack of funds for the participant. - # Don't try any further transfers. - - log("FAILURE: %s" % msg) - return -1 - - log("SUCCESS: %s" % msg) - return 1 - - - def transfer(self, tipper, tippee, amount, pachinko=False): - """Given two unicodes, a Decimal, and a boolean, return a boolean. - - If the tipper doesn't have enough in their Gittip account then we - return False. Otherwise we decrement tipper's balance and increment - tippee's *pending* balance by amount. - - """ - typecheck( tipper, unicode - , tippee, unicode - , amount, Decimal - , pachinko, bool - ) - with self.db.get_cursor() as cursor: - - try: - self.debit_participant(cursor, tipper, amount) - except NegativeBalance: - return False - - self.credit_participant(cursor, tippee, amount) - context = 'take' if pachinko else 'tip' - self.record_transfer(cursor, tipper, tippee, amount, context) + RETURNING ts_end AT TIME ZONE 'UTC' - return True - - - def debit_participant(self, cursor, participant, amount): - """Decrement the tipper's balance. - """ - - DECREMENT = """\ - - UPDATE participants - SET balance = (balance - %(amount)s) - WHERE username = %(participant)s - AND balance >= %(amount)s - RETURNING pending - - """ - args = dict(amount=amount, participant=participant) - r = cursor.one(DECREMENT, args, default=False) - if r is False: - raise NegativeBalance - assert r is not None, (amount, participant) # sanity check - - - def credit_participant(self, cursor, participant, amount): - """Increment the tippee's *pending* balance. - - The pending balance will clear to the balance proper when Payday is - done. - - """ - - INCREMENT = """\ - - UPDATE participants - SET pending=(pending + %s) - WHERE username=%s - AND pending IS NOT NULL - RETURNING pending - - """ - cursor.execute(INCREMENT, (amount, participant)) - rec = cursor.fetchone() - assert rec is not None, (participant, amount) # sanity check - - - # Move money between Gittip and the outside world. - # ================================================ - - def charge(self, participant, amount): - """Given dict and Decimal, return None. - - This is the only place where we actually charge credit cards. Amount - should be the nominal amount. We'll compute Gittip's fee below this - function and add it to amount to end up with charge_amount. - - """ - typecheck(participant, Participant, amount, Decimal) - - username = participant.username - balanced_customer_href = participant.balanced_customer_href - - typecheck( username, unicode - , balanced_customer_href, (unicode, None) - ) - - - # Perform some last-minute checks. - # ================================ - - if balanced_customer_href is None: - self.mark_missing_funding() - return # Participant has no funding source. - - if not is_whitelisted(participant): - return # Participant not trusted. - - - # Go to Balanced. - # =============== - - things = self.charge_on_balanced( username - , balanced_customer_href - , amount - ) - charge_amount, fee, error = things - - amount = charge_amount - fee # account for possible rounding under - # charge_on_* - - self.record_charge( amount - , fee - , error - , username - ) - - - def ach_credit(self, ts_start, participant, tips, total, minimum_credit=MINIMUM_CREDIT): - - # Compute the amount to credit them. - # ================================== - # Leave money in Gittip to cover their obligations next week (as these - # currently stand). Also reduce the amount by our service fee. - - balance = participant.balance - assert balance is not None, balance # sanity check - amount = balance - total - - # Do some last-minute checks. - # =========================== - - if amount <= 0: - return # Participant not owed anything. - - if amount < minimum_credit: - also_log = "" - if total > 0: - also_log = " ($%s balance - $%s in obligations)" - also_log %= (balance, total) - log("Minimum payout is $%s. %s is only due $%s%s." - % (minimum_credit, participant.username, amount, also_log)) - return # Participant owed too little. - - if not is_whitelisted(participant): - return # Participant not trusted. - - - # Do final calculations. - # ====================== - - credit_amount, fee = skim_credit(amount) - cents = credit_amount * 100 - - if total > 0: - also_log = "$%s balance - $%s in obligations" - also_log %= (balance, total) - else: - also_log = "$%s" % amount - msg = "Crediting %s %d cents (%s - $%s fee = $%s) on Balanced ... " - msg %= (participant.username, cents, also_log, fee, credit_amount) - - - # Try to dance with Balanced. - # =========================== - - try: - balanced_customer_href = participant.balanced_customer_href - if balanced_customer_href is None: - log("%s has no balanced_customer_href." - % participant.username) - return # not in Balanced - - customer = balanced.Customer.fetch(balanced_customer_href) - customer.bank_accounts.one()\ - .credit(amount=cents, - description=participant.username) - - log(msg + "succeeded.") - error = "" - except balanced.exc.HTTPError as err: - error = err.message.message - except: - error = repr(sys.exc_info()[1]) - - if error: - log(msg + "failed: %s" % error) - - self.record_credit(credit_amount, fee, error, participant) - - - def charge_on_balanced(self, username, balanced_customer_href, amount): - """We have a purported balanced_customer_href. Try to use it. - """ - typecheck( username, unicode - , balanced_customer_href, unicode - , amount, Decimal - ) - - cents, msg, charge_amount, fee = self._prep_hit(amount) - msg = msg % (username, "Balanced") - - try: - customer = balanced.Customer.fetch(balanced_customer_href) - customer.cards.one().debit(amount=cents, description=username) - log(msg + "succeeded.") - error = "" - except balanced.exc.HTTPError as err: - error = err.message.message - except: - error = repr(sys.exc_info()[1]) - - if error: - log(msg + "failed: %s" % error) - - return charge_amount, fee, error - - - def _prep_hit(self, unrounded): - """Takes an amount in dollars. Returns cents, etc. - - cents This is passed to the payment processor charge API. This is - the value that is actually charged to the participant. It's - an int. - msg A log message with a couple %s to be filled in by the - caller. - upcharged Decimal dollar equivalent to `cents'. - fee Decimal dollar amount of the fee portion of `upcharged'. - - The latter two end up in the db in a couple places via record_charge. - - """ - also_log = '' - rounded = unrounded - if unrounded < MINIMUM_CHARGE: - rounded = MINIMUM_CHARGE # per github/#167 - also_log = ' [rounded up from $%s]' % unrounded - - upcharged, fee = upcharge(rounded) - cents = int(upcharged * 100) - - msg = "Charging %%s %d cents ($%s%s + $%s fee = $%s) on %%s ... " - msg %= cents, rounded, also_log, fee, upcharged - - return cents, msg, upcharged, fee + """, default=NoPayday).replace(tzinfo=aspen.utils.utc) # Record-keeping. # =============== - def record_charge(self, amount, fee, error, username): - """Given a Bunch of Stuff, return None. - - This function takes the result of an API call to a payment processor - and records the result in our db. If the power goes out at this point - then Postgres will be out of sync with the payment processor. We'll - have to resolve that manually be reviewing the transaction log at the - processor and modifying Postgres accordingly. - - For Balanced, this could be automated by generating an ID locally and - commiting that to the db and then passing that through in the meta - field.* Then syncing would be a case of simply:: - - for payment in unresolved_payments: - payment_in_balanced = balanced.Transaction.query.filter( - **{'meta.unique_id': 'value'}).one() - payment.transaction_uri = payment_in_balanced.uri - - * https://www.balancedpayments.com/docs/meta - - """ - - with self.db.get_cursor() as cursor: - - if error: - last_bill_result = error - amount = Decimal('0.00') - self.mark_charge_failed(cursor) - else: - last_bill_result = '' - EXCHANGE = """\ - - INSERT INTO exchanges - (amount, fee, participant) - VALUES (%s, %s, %s) - - """ - cursor.execute(EXCHANGE, (amount, fee, username)) - - - # Update the participant's balance. - # ================================= - # Credit card charges go immediately to balance, not to pending. - - RESULT = """\ - - UPDATE participants - SET last_bill_result=%s - , balance=(balance + %s) - WHERE username=%s - - """ - cursor.execute(RESULT, (last_bill_result, amount, username)) - - - def record_credit(self, amount, fee, error, participant): - """Given a Bunch of Stuff, return None. - - Records in the exchanges table for credits have these characteristics: - - amount It's negative, representing an outflow from Gittip to you. - This is oppositive of charges, where amount is positive. - The sign is how we differentiate the two in, e.g., the - history page. - - fee It's positive, just like with charges. - - """ - username = participant.username - credit = -amount # From Gittip's POV this is money flowing out of the - # system. - - with self.db.get_cursor() as cursor: - - if error: - last_ach_result = error - credit = fee = Decimal('0.00') # ensures balance won't change - self.mark_ach_failed(cursor) - else: - last_ach_result = '' - EXCHANGE = """\ - - INSERT INTO exchanges - (amount, fee, participant) - VALUES (%s, %s, %s) - - """ - cursor.execute(EXCHANGE, (credit, fee, username)) - - - # Update the participant's balance. - # ================================= - - RESULT = """\ - - UPDATE participants - SET last_ach_result=%s - , balance=(balance + %s) - WHERE username=%s - RETURNING balance - - """ - balance = cursor.one(RESULT, ( last_ach_result - , credit - fee # -10.00 - 0.30 = -10.30 - , username - )) - if balance < 0: - raise NegativeBalance - - participant.set_attributes(balance=balance) - - - def record_transfer(self, cursor, tipper, tippee, amount, context): - cursor.run("""\ - - INSERT INTO transfers - (tipper, tippee, amount, context) - VALUES (%s, %s, %s, %s) - - """, (tipper, tippee, amount, context)) - - - def mark_missing_funding(self): - self.db.one("""\ - - UPDATE paydays - SET ncc_missing = ncc_missing + 1 - WHERE ts_end='1970-01-01T00:00:00+00'::timestamptz - RETURNING id - - """, default=NoPayday) - - - def mark_charge_failed(self, cursor): - STATS = """\ + @staticmethod + def mark_charge_failed(cursor): + cursor.one("""\ UPDATE paydays SET ncc_failing = ncc_failing + 1 WHERE ts_end='1970-01-01T00:00:00+00'::timestamptz RETURNING id - """ - cursor.execute(STATS) - assert cursor.fetchone() is not None + """, default=NoPayday) - def mark_ach_failed(self, cursor): - cursor.one("""\ + def mark_ach_failed(self): + self.db.one("""\ UPDATE paydays SET nach_failing = nach_failing + 1 @@ -913,11 +665,11 @@ def mark_ach_failed(self, cursor): """, default=NoPayday) - def mark_participant(self): + def mark_stage_done(self): self.db.one("""\ UPDATE paydays - SET nparticipants = nparticipants + 1 + SET stage = stage + 1 WHERE ts_end='1970-01-01T00:00:00+00'::timestamptz RETURNING id diff --git a/gittip/cli.py b/gittip/cli.py index 040857de0e..6aefedff65 100644 --- a/gittip/cli.py +++ b/gittip/cli.py @@ -7,15 +7,9 @@ def payday(): # Wire things up. # =============== - # Manually override max db connections so that we only have one connection. - # Our db access is serialized right now anyway, and with only one - # connection it's easier to trust changes to statement_timeout. The point - # here is that we want to turn off statement_timeout for payday. env = wireup.env() - env.database_maxconn = 1 db = wireup.db(env) - db.run("SET statement_timeout = 0") wireup.billing(env) wireup.nanswers(env) @@ -26,10 +20,13 @@ def payday(): # This dodges a problem where db in billing is None if we import it from # gittip before calling wireup.billing. + from gittip.billing.exchanges import sync_with_balanced from gittip.billing.payday import Payday try: - Payday(db).run() + with db.get_cursor() as cursor: + sync_with_balanced(cursor) + Payday.start().run() except KeyboardInterrupt: pass except: diff --git a/gittip/exceptions.py b/gittip/exceptions.py index a75fb6fd1e..9e1bd1d340 100644 --- a/gittip/exceptions.py +++ b/gittip/exceptions.py @@ -44,3 +44,6 @@ class FailedToReserveUsername(Exception): pass class NegativeBalance(Exception): def __str__(self): return "Negative balance not allowed in this context." + +class NotWhitelisted(Exception): pass +class NoBalancedCustomerHref(Exception): pass diff --git a/gittip/models/__init__.py b/gittip/models/__init__.py index a78fc4da38..8c1fc72a93 100644 --- a/gittip/models/__init__.py +++ b/gittip/models/__init__.py @@ -9,227 +9,222 @@ from postgres import Postgres import psycopg2.extras + class GittipDB(Postgres): def self_check(self): - """ - Runs all available self checks on the database. - """ - self._check_balances() - self._check_tips() - self._check_orphans() - self._check_orphans_no_tips() - self._check_paydays_volumes() - self._check_claimed_not_locked() - - def _check_tips(self): - """ - Checks that there are no rows in tips with duplicate (tipper, tippee, mtime). - - https://github.com/gittip/www.gittip.com/issues/1704 - """ - conflicting_tips = self.one(""" - SELECT count(*) - FROM - ( - SELECT * FROM tips - EXCEPT - SELECT DISTINCT ON(tipper, tippee, mtime) * - FROM tips - ORDER BY tipper, tippee, mtime - ) AS foo - """) - assert conflicting_tips == 0 - - def _check_balances(self): - """ - Recalculates balances for all participants from transfers and exchanges. - - https://github.com/gittip/www.gittip.com/issues/1118 - """ - with self.get_cursor() as cursor: - if cursor.one("select exists (select * from paydays where ts_end < ts_start) as running"): - # payday is running and the query bellow does not account for pending - return - b = cursor.one(""" - select count(*) - from ( - select username, sum(a) as balance - from ( - select participant as username, sum(amount) as a - from exchanges - where amount > 0 - group by participant - - union all - - select participant as username, sum(amount-fee) as a - from exchanges - where amount < 0 - group by participant - - union all - - select tipper as username, sum(-amount) as a - from transfers - group by tipper - - union all - - select tippee as username, sum(amount) as a - from transfers - group by tippee - ) as foo - group by username - - except - - select username, balance - from participants - ) as foo2 - """) - assert b == 0, "conflicting balances: {}".format(b) - - def _check_orphans(self): - """ - Finds participants that - * does not have corresponding elsewhere account - * have not been absorbed by other participant - - These are broken because new participants arise from elsewhere - and elsewhere is detached only by take over which makes a note - in absorptions if it removes the last elsewhere account. - - Especially bad case is when also claimed_time is set because - there must have been elsewhere account attached and used to sign in. - - https://github.com/gittip/www.gittip.com/issues/617 - """ - orphans = self.all(""" - select username - from participants - where not exists (select * from elsewhere where elsewhere.participant=username) - and not exists (select * from absorptions where archived_as=username) - """) - assert len(orphans) == 0, "missing elsewheres: {}".format(list(orphans)) - - def _check_orphans_no_tips(self): - """ - Finds participants - * without elsewhere account attached - * having non zero outstanding tip - - This should not happen because when we remove the last elsewhere account - in take_over we also zero out all tips. - """ - tips_with_orphans = self.all(""" - WITH orphans AS ( - SELECT username FROM participants - WHERE NOT EXISTS (SELECT 1 FROM elsewhere WHERE participant=username) - ), valid_tips AS ( - SELECT * FROM ( - SELECT DISTINCT ON (tipper, tippee) * - FROM tips - ORDER BY tipper, tippee, mtime DESC - ) AS foo - WHERE amount > 0 - ) - SELECT id FROM valid_tips - WHERE tipper IN (SELECT * FROM orphans) - OR tippee IN (SELECT * FROM orphans) - """) - known = set([25206, 46266]) # '4c074000c7bc', 'naderman', '3.00' - real = set(tips_with_orphans) - known - assert len(real) == 0, real - - def _check_paydays_volumes(self): - """ - Recalculate *_volume fields in paydays table using exchanges table. - """ with self.get_cursor() as cursor: - if cursor.one("select exists (select * from paydays where ts_end < ts_start) as running"): - # payday is running - return - charge_volume = cursor.all(""" - select * from ( - select id, ts_start, charge_volume, ( - select coalesce(sum(amount+fee), 0) - from exchanges - where timestamp > ts_start - and timestamp < ts_end - and amount > 0 - and recorder is null - ) as ref - from paydays - order by id - ) as foo - where charge_volume != ref - """) - assert len(charge_volume) == 0 - - charge_fees_volume = cursor.all(""" - select * from ( - select id, ts_start, charge_fees_volume, ( - select coalesce(sum(fee), 0) - from exchanges - where timestamp > ts_start - and timestamp < ts_end - and amount > 0 - and recorder is null - ) as ref - from paydays - order by id - ) as foo - where charge_fees_volume != ref - """) - assert len(charge_fees_volume) == 0 - - ach_volume = cursor.all(""" - select * from ( - select id, ts_start, ach_volume, ( - select coalesce(sum(amount), 0) - from exchanges - where timestamp > ts_start - and timestamp < ts_end - and amount < 0 - and recorder is null - ) as ref - from paydays - order by id - ) as foo - where ach_volume != ref - """) - assert len(ach_volume) == 0 - - ach_fees_volume = cursor.all(""" - select * from ( - select id, ts_start, ach_fees_volume, ( - select coalesce(sum(fee), 0) - from exchanges - where timestamp > ts_start - and timestamp < ts_end - and amount < 0 - and recorder is null - ) as ref - from paydays - order by id - ) as foo - where ach_fees_volume != ref - """) - assert len(ach_fees_volume) == 0 - - def _check_claimed_not_locked(self): - locked = self.all(""" - SELECT participant - FROM elsewhere - WHERE EXISTS ( - SELECT * - FROM participants - WHERE username=participant - AND claimed_time IS NOT NULL - ) AND is_locked - """) - assert len(locked) == 0 + check_db(cursor) + + +def check_db(cursor): + """Runs all available self checks on the given cursor. + """ + _check_balances(cursor) + _check_tips(cursor) + _check_orphans(cursor) + _check_orphans_no_tips(cursor) + _check_paydays_volumes(cursor) + _check_claimed_not_locked(cursor) + + +def _check_tips(cursor): + """ + Checks that there are no rows in tips with duplicate (tipper, tippee, mtime). + + https://github.com/gittip/www.gittip.com/issues/1704 + """ + conflicting_tips = cursor.one(""" + SELECT count(*) + FROM + ( + SELECT * FROM tips + EXCEPT + SELECT DISTINCT ON(tipper, tippee, mtime) * + FROM tips + ORDER BY tipper, tippee, mtime + ) AS foo + """) + assert conflicting_tips == 0 + + +def _check_balances(cursor): + """ + Recalculates balances for all participants from transfers and exchanges. + + https://github.com/gittip/www.gittip.com/issues/1118 + """ + b = cursor.all(""" + select p.username, expected, balance as actual + from ( + select username, sum(a) as expected + from ( + select participant as username, sum(amount) as a + from exchanges + where amount > 0 + and (status is null or status = 'succeeded') + group by participant + + union all + + select participant as username, sum(amount-fee) as a + from exchanges + where amount < 0 + and (status is null or status <> 'failed') + group by participant + + union all + + select tipper as username, sum(-amount) as a + from transfers + group by tipper + + union all + + select tippee as username, sum(amount) as a + from transfers + group by tippee + ) as foo + group by username + ) as foo2 + join participants p on p.username = foo2.username + where expected <> p.balance + """) + assert len(b) == 0, "conflicting balances: {}".format(b) + + +def _check_orphans(cursor): + """ + Finds participants that + * does not have corresponding elsewhere account + * have not been absorbed by other participant + + These are broken because new participants arise from elsewhere + and elsewhere is detached only by take over which makes a note + in absorptions if it removes the last elsewhere account. + + Especially bad case is when also claimed_time is set because + there must have been elsewhere account attached and used to sign in. + + https://github.com/gittip/www.gittip.com/issues/617 + """ + orphans = cursor.all(""" + select username + from participants + where not exists (select * from elsewhere where elsewhere.participant=username) + and not exists (select * from absorptions where archived_as=username) + """) + assert len(orphans) == 0, "missing elsewheres: {}".format(list(orphans)) + + +def _check_orphans_no_tips(cursor): + """ + Finds participants + * without elsewhere account attached + * having non zero outstanding tip + + This should not happen because when we remove the last elsewhere account + in take_over we also zero out all tips. + """ + orphans_with_tips = cursor.all(""" + WITH valid_tips AS (SELECT * FROM current_tips WHERE amount > 0) + SELECT username + FROM (SELECT tipper AS username FROM valid_tips + UNION + SELECT tippee AS username FROM valid_tips) foo + WHERE NOT EXISTS (SELECT 1 FROM elsewhere WHERE participant=username) + """) + assert len(orphans_with_tips) == 0, orphans_with_tips + + +def _check_paydays_volumes(cursor): + """ + Recalculate *_volume fields in paydays table using exchanges table. + """ + if cursor.one("select exists (select * from paydays where ts_end < ts_start) as running"): + # payday is running + return + charge_volume = cursor.all(""" + select * from ( + select id, ts_start, charge_volume, ( + select coalesce(sum(amount+fee), 0) + from exchanges + where timestamp > ts_start + and timestamp < ts_end + and amount > 0 + and recorder is null + ) as ref + from paydays + order by id + ) as foo + where charge_volume != ref + """) + assert len(charge_volume) == 0 + + charge_fees_volume = cursor.all(""" + select * from ( + select id, ts_start, charge_fees_volume, ( + select coalesce(sum(fee), 0) + from exchanges + where timestamp > ts_start + and timestamp < ts_end + and amount > 0 + and recorder is null + ) as ref + from paydays + order by id + ) as foo + where charge_fees_volume != ref + """) + assert len(charge_fees_volume) == 0 + + ach_volume = cursor.all(""" + select * from ( + select id, ts_start, ach_volume, ( + select coalesce(sum(amount), 0) + from exchanges + where timestamp > ts_start + and timestamp < ts_end + and amount < 0 + and recorder is null + ) as ref + from paydays + order by id + ) as foo + where ach_volume != ref + """) + assert len(ach_volume) == 0 + + ach_fees_volume = cursor.all(""" + select * from ( + select id, ts_start, ach_fees_volume, ( + select coalesce(sum(fee), 0) + from exchanges + where timestamp > ts_start + and timestamp < ts_end + and amount < 0 + and recorder is null + ) as ref + from paydays + order by id + ) as foo + where ach_fees_volume != ref + """) + assert len(ach_fees_volume) == 0 + + +def _check_claimed_not_locked(cursor): + locked = cursor.all(""" + SELECT participant + FROM elsewhere + WHERE EXISTS ( + SELECT * + FROM participants + WHERE username=participant + AND claimed_time IS NOT NULL + ) AND is_locked + """) + assert len(locked) == 0 def add_event(c, type, payload): diff --git a/gittip/models/_mixin_team.py b/gittip/models/_mixin_team.py index 5a866b267f..d4cea3559b 100644 --- a/gittip/models/_mixin_team.py +++ b/gittip/models/_mixin_team.py @@ -29,7 +29,7 @@ def show_as_team(self, user): return False if user.ADMIN: return True - if not self.get_takes(): + if not self.get_current_takes(): if self == user.participant: return True return False @@ -39,7 +39,7 @@ def add_member(self, member): """Add a member to this team. """ assert self.IS_PLURAL - if len(self.get_takes()) == 149: + if len(self.get_current_takes()) == 149: raise MemberLimitReached if not member.is_claimed: raise StubParticipantAdded @@ -65,7 +65,7 @@ def member_of(self, team): """Given a Participant object, return a boolean. """ assert team.IS_PLURAL - for take in team.get_takes(): + for take in team.get_current_takes(): if take['member'] == self.username: return True return False @@ -180,56 +180,17 @@ def update_taking(self, old_takes, new_takes, cursor=None, member=None): if member and username == member.username: member.set_attributes(**r._asdict()) - def get_takes(self, for_payday=False, cursor=None): + def get_current_takes(self, cursor=None): """Return a list of member takes for a team. - - This is implemented parallel to Participant.get_tips_and_total. See - over there for an explanation of for_payday. - """ assert self.IS_PLURAL - - args = dict(team=self.username) - - if for_payday: - args['ts_start'] = for_payday - - # Get the takes for this team, as they were before ts_start, - # filtering out the ones we've already transferred (in case payday - # is interrupted and restarted). - - TAKES = """\ - - SELECT * FROM ( - SELECT DISTINCT ON (member) t.* - FROM takes t - JOIN participants p ON p.username = member - WHERE team=%(team)s - AND mtime < %(ts_start)s - AND p.is_suspicious IS NOT true - AND ( SELECT id - FROM transfers - WHERE tipper=t.team - AND tippee=t.member - AND context='take' - AND timestamp >= %(ts_start)s - ) IS NULL - ORDER BY member, mtime DESC - ) AS foo - ORDER BY ctime DESC - - """ - else: - TAKES = """\ - - SELECT member, amount, ctime, mtime - FROM current_takes - WHERE team=%(team)s - ORDER BY ctime DESC - - """ - - records = (cursor or self.db).all(TAKES, args) + TAKES = """ + SELECT member, amount, ctime, mtime + FROM current_takes + WHERE team=%(team)s + ORDER BY ctime DESC + """ + records = (cursor or self.db).all(TAKES, dict(team=self.username)) return [r._asdict() for r in records] def get_team_take(self, cursor=None): @@ -250,7 +211,7 @@ def compute_actual_takes(self, cursor=None): """Get the takes, compute the actual amounts, and return an OrderedDict. """ actual_takes = OrderedDict() - nominal_takes = self.get_takes(cursor=cursor) + nominal_takes = self.get_current_takes(cursor=cursor) nominal_takes.append(self.get_team_take(cursor=cursor)) budget = balance = self.balance + self.receiving for take in nominal_takes: diff --git a/gittip/models/participant.py b/gittip/models/participant.py index f35d500df3..6d3bcc1878 100644 --- a/gittip/models/participant.py +++ b/gittip/models/participant.py @@ -275,28 +275,13 @@ def close(self, disbursement_strategy): self.update_is_closed(True, cursor) - class NotWhitelisted(Exception): pass - class NoBalancedCustomerHref(Exception): pass - def withdraw_balance_to_bank_account(self, cursor): - if self.is_suspicious in (True, None): - raise self.NotWhitelisted - if self.balanced_customer_href is None: - raise self.NoBalancedCustomerHref - - from gittip.billing.payday import Payday - hack = Payday(self.db) # Our payout code is on the Payday object. Rather than - # refactor right now, let's just use it from there. - - # Monkey-patch a couple methods, coopting them for callbacks, essentially. - hack.mark_ach_failed = lambda cursor: None - - hack.ach_credit( ts_start=None # not used - , participant=self - , tips=None # not used - , total=Decimal('0.00') # don't withold anything - , minimum_credit=Decimal('0.00') # send it all - ) # XXX Records the exchange using a different cursor. :-/ + from gittip.billing.exchanges import ach_credit + ach_credit( self.db + , self + , Decimal('0.00') # don't withhold anything + , Decimal('0.00') # send it all + ) class NoOneToGiveFinalGiftTo(Exception): pass @@ -848,55 +833,10 @@ def get_giving_for_profile(self): return tips, total, unclaimed_tips, unclaimed_total - def get_tips_and_total(self, for_payday=False): - """Given a participant id and a date, return a list and a Decimal. - - This function is used by the payday function. If for_payday is not - False it must be a date object. Originally we also used this function - to populate the profile page, but our requirements there changed while, - oddly, our requirements in payday *also* changed to match the old - requirements of the profile page. So this function keeps the for_payday - parameter after all. - + def get_current_tips(self): + """Get the tips this participant is currently sending to others. """ - - if for_payday: - - # For payday we want the oldest relationship to be paid first. - order_by = "ctime ASC" - - - # This is where it gets crash-proof. - # ================================== - # We need to account for the fact that we may have crashed during - # Payday and we're re-running that function. We only want to select - # tips that existed before Payday started, but haven't been - # processed as part of this Payday yet. - # - # It's a bug if the paydays subselect returns > 1 rows. - # - # XXX If we crash during Payday and we rerun it after a timezone - # change, will we get burned? How? - - ts_filter = """\ - - AND mtime < %s - AND ( SELECT id - FROM transfers - WHERE tipper=t.tipper - AND tippee=t.tippee - AND timestamp >= %s - ) IS NULL - - """ - args = (self.username, for_payday, for_payday) - else: - order_by = "amount DESC" - ts_filter = "" - args = (self.username,) - - TIPS = """\ - + TIPS = """ SELECT * FROM ( SELECT DISTINCT ON (tippee) amount @@ -905,34 +845,15 @@ def get_tips_and_total(self, for_payday=False): , p.claimed_time FROM tips t JOIN participants p ON p.username = t.tippee - WHERE tipper = %%s + WHERE tipper = %s AND p.is_suspicious IS NOT true - %s ORDER BY tippee , t.mtime DESC ) AS foo - ORDER BY %s + ORDER BY amount DESC , tippee - - """ % (ts_filter, order_by) # XXX, No injections here, right?! - tips = self.db.all(TIPS, args, back_as=dict) - - - # Compute the total. - # ================== - # For payday we only want to process payments to tippees who have - # themselves opted into Gittip. For the tipper's profile page we want - # to show the total amount they've pledged (so they're not surprised - # when someone *does* start accepting tips and all of a sudden they're - # hit with bigger charges. - - if for_payday: - to_total = [t for t in tips if t['claimed_time'] is not None] - else: - to_total = tips - total = sum([t['amount'] for t in to_total], Decimal('0.00')) - - return tips, total + """ + return self.db.all(TIPS, (self.username,), back_as=dict) def get_og_title(self): diff --git a/gittip/testing/__init__.py b/gittip/testing/__init__.py index ea6e852a08..502281b9e8 100644 --- a/gittip/testing/__init__.py +++ b/gittip/testing/__init__.py @@ -2,15 +2,14 @@ """ from __future__ import absolute_import, division, print_function, unicode_literals -import datetime import itertools import unittest -from decimal import Decimal from os.path import join, dirname, realpath from aspen import resources from aspen.utils import utcnow from aspen.testing.client import Client +from gittip.billing.exchanges import record_exchange, record_exchange_result from gittip.elsewhere import UserInfo from gittip.models.account_elsewhere import AccountElsewhere from gittip.security.user import User, SESSION @@ -63,6 +62,7 @@ class Harness(unittest.TestCase): @classmethod def setUpClass(cls): + cls.db.run("ALTER SEQUENCE exchanges_id_seq RESTART WITH 1") cls.setUpVCR() @@ -104,6 +104,7 @@ def clear_tables(self): self.db.run("DELETE FROM %s CASCADE" % tablename) except (IntegrityError, InternalError): tablenames.insert(0, tablename) + self.db.run("ALTER SEQUENCE participants_id_seq RESTART WITH 1") def make_elsewhere(self, platform, user_id, user_name, **kw): @@ -178,21 +179,14 @@ def make_participant(self, username, **kw): return participant - def make_payday(self, *transfers): - - with self.db.get_cursor() as cursor: - last_end = datetime.datetime(year=2012, month=1, day=1) - last_end = cursor.one("SELECT ts_end FROM paydays ORDER BY ts_end DESC LIMIT 1", default=last_end) - ts_end = last_end + datetime.timedelta(days=7) - ts_start = ts_end - datetime.timedelta(hours=1) - transfer_volume = Decimal(0) - active = set() - for i, (f, t, amount) in enumerate(transfers): - cursor.run("INSERT INTO transfers (timestamp, tipper, tippee, amount, context)" - "VALUES (%s, %s, %s, %s, 'tip')", - (ts_start + datetime.timedelta(seconds=i), f, t, amount)) - transfer_volume += Decimal(amount) - active.add(f) - active.add(t) - cursor.run("INSERT INTO paydays (ts_start, ts_end, nactive, transfer_volume) VALUES (%s, %s, %s, %s)", - (ts_start, ts_end, len(active), transfer_volume)) + def fetch_payday(self): + return self.db.one("SELECT * FROM paydays", back_as=dict) + + + def make_exchange(self, kind, amount, fee, participant, status='succeeded', error=''): + e_id = record_exchange(self.db, kind, amount, fee, participant, 'pre') + record_exchange_result(self.db, e_id, status, error, participant) + return e_id + + +class Foobar(Exception): pass diff --git a/gittip/testing/balanced.py b/gittip/testing/balanced.py index b9a431ae38..c0ef76474a 100644 --- a/gittip/testing/balanced.py +++ b/gittip/testing/balanced.py @@ -9,7 +9,8 @@ class BalancedHarness(Harness): def setUp(self): - self.david = self.make_participant('david', claimed_time='now', + self.david = self.make_participant('david', is_suspicious=False, + claimed_time='now', balanced_customer_href=self.david_href) self.janet = self.make_participant('janet', is_suspicious=False, claimed_time='now', diff --git a/gittip/utils/history.py b/gittip/utils/history.py index 16e6b75bf5..7d53301851 100644 --- a/gittip/utils/history.py +++ b/gittip/utils/history.py @@ -47,10 +47,12 @@ def iter_payday_events(db, participant): if 'fee' in event: if event['amount'] > 0: kind = 'charge' - balance -= event['amount'] + if event['status'] in (None, 'succeeded'): + balance -= event['amount'] else: kind = 'credit' - balance -= event['amount'] - event['fee'] + if event['status'] != 'failed': + balance -= event['amount'] - event['fee'] else: kind = 'transfer' if event['tippee'] == username: diff --git a/gittip/wireup.py b/gittip/wireup.py index 8bb780b432..fc63e19aa6 100644 --- a/gittip/wireup.py +++ b/gittip/wireup.py @@ -6,6 +6,7 @@ import aspen import balanced import gittip +import gittip.billing.payday import raven import mandrill from environment import Environment, is_yesish @@ -37,6 +38,7 @@ def db(env): db.register_model(AccountElsewhere) db.register_model(Participant) db.register_model(EmailAddressWithConfirmation) + gittip.billing.payday.Payday.db = db return db diff --git a/payday.sh b/payday.sh index 8ca19ac86b..a71b1bc615 100755 --- a/payday.sh +++ b/payday.sh @@ -15,7 +15,7 @@ cd "`dirname $0`" # --help # ====== -if [ $# = 0 ]; then +if [ $# = 0 -o "$1" = "" ]; then echo echo "Usage: $0 [\"for_real_please\"]" echo @@ -80,24 +80,24 @@ else RUN="Run" fi -if [ $1 ]; then - require foreman - confirm "$RUN payday #$1?" - if [ $? -eq 0 ]; then - if [ "$2" == "" ]; then - start - honcho run -e defaults.env,local.env ./env/bin/payday >> $LOG 2>&1 - else - if [ "$2" == "for_real_please" ]; then - confirm "$RUN payday #$1 FOR REAL?!?!?!??!?!?" - if [ $? -eq 0 ]; then - start - heroku config -s | foreman run -e /dev/stdin \ - ./env/bin/payday >> $LOG 2>&1 - fi - else - echo "Your second arg was $2. Wazzat mean?" - fi - fi - fi -fi +PATH="./env/bin:$PATH" +require honcho +confirm "$RUN payday #$1?" || exit 0 +case "$2" in + "") + start + honcho run -e defaults.env,local.env payday >>$LOG 2>&1 & + ;; + "for_real_please") + confirm "$RUN payday #$1 FOR REAL?!?!?!??!?!?" || exit 0 + start + heroku config -s | honcho run -e /dev/stdin payday >>$LOG 2>&1 & + ;; + *) + echo "Your second arg was $2. Wazzat mean?" + exit 1 + ;; +esac + +disown -a +tail -f $LOG diff --git a/requirements.txt b/requirements.txt index 3a6a86fa6a..8b3e78208a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,7 +28,7 @@ ./vendor/iso8601-0.1.4.tar.gz ./vendor/mock-0.8.0.tar.gz -./vendor/balanced-1.0.1beta2.tar.gz +./vendor/balanced-1.1.1.tar.gz ./vendor/python-bitcoinaddress-0.2.2.tar.gz ./vendor/raven-3.1.4.tar.gz diff --git a/tests/py/fixtures/BalancedHarness.yml b/tests/py/fixtures/BalancedHarness.yml index a8cbaeb1b3..496ee65a20 100644 --- a/tests/py/fixtures/BalancedHarness.yml +++ b/tests/py/fixtures/BalancedHarness.yml @@ -6,10 +6,10 @@ interactions: uri: https://api.balancedpayments.com:443/api_keys response: body: {string: !!python/unicode "{\n \"links\": {},\n \"api_keys\": [\n {\n - \ \"links\": {},\n \"created_at\": \"2014-07-01T11:32:21.176697Z\",\n - \ \"secret\": \"ak-test-i2BYNzhi88y5uxqw4Rcw738sk2rjLWiY\",\n \"href\": - \"/api_keys/AK2QkRBCbioFJrtCGdS61egF\",\n \"meta\": {},\n \"id\": - \"AK2QkRBCbioFJrtCGdS61egF\"\n }\n ]\n}"} + \ \"links\": {},\n \"created_at\": \"2014-07-01T15:43:42.734567Z\",\n + \ \"secret\": \"ak-test-W2FghBPvv0YNgaln7waeGwjVoH7oq1A6\",\n \"href\": + \"/api_keys/AK3JDxCRGTrpx6szS4xRqFxn\",\n \"meta\": {},\n \"id\": + \"AK3JDxCRGTrpx6szS4xRqFxn\"\n }\n ]\n}"} headers: content-length: ['289'] content-type: [application/json] @@ -22,20 +22,20 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA5VUTW/bMAy991cEPuyyJfFngQQotrXZZe3QYE0xbMNgyBaNeJElQ5aabEH++2hZ - rmNMKLZLQFKP5CP54uPFZOJVoIi3nBzRRo+RRqHnzSsid6BqRnJo3rKyKtVVmLwSRdGAuvK9Nx2c - w6GFc82YjWwlFP9RwFRGfJjY/K4DRnwbqCU8lUI34zZKKMIwFFhUUcp/I468T22Odz4gFvpuBuq2 - gK8lT6HJpdi3PXw/DhZ+2LXCRyoqggAtWwYeHEhVM5jlorJrQQgnFbSPa52xMp+s4Gl4YyXfteP0 - zRAu9hxkmutGiQpkm3jzGOwfi693q+xud7++pcFn+L29PmSe4WmHMCdzbny++fCwmX5aB/vNr8Pq - /cfbG/Jl/fP6Ib5nZUwHLrkEoo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eu6 + 0PhZ0dxCe9uF+/ufNHsefHYYLX0MPTpHUZLwhhhZdQONAi4CGeHblOS50NzefRxx5eSEsYzk5qvg + zQbPhUWl9IWt2X7Szo5/AKMg5n7NBQAA headers: content-encoding: [gzip] - content-length: ['593'] + content-length: ['594'] content-type: [application/json] status: {code: 200, message: OK} - request: @@ -46,9 +46,9 @@ interactions: response: body: {string: !!python/unicode "{\n \"customers\": [\n {\n \"name\": null,\n \"links\": {\n \"source\": null,\n \"destination\": - null\n },\n \"updated_at\": \"2014-07-01T11:32:21.952391Z\",\n \"created_at\": - \"2014-07-01T11:32:21.838223Z\",\n \"dob_month\": null,\n \"id\": - \"CU2R4ZqaRKDZoW1GpfgeKFbr\",\n \"phone\": null,\n \"href\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr\",\n + null\n },\n \"updated_at\": \"2014-07-01T15:43:43.537316Z\",\n \"created_at\": + \"2014-07-01T15:43:43.416311Z\",\n \"dob_month\": null,\n \"id\": + \"CU3KoKRb123DPYH3y6rw4OmF\",\n \"phone\": null,\n \"href\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF\",\n \ \"merchant_status\": \"no-match\",\n \"meta\": {\n \"seq\": \"0\"\n },\n \"dob_year\": null,\n \"address\": {\n \"city\": null,\n \"line2\": null,\n \"line1\": null,\n \"state\": @@ -77,9 +77,9 @@ interactions: response: body: {string: !!python/unicode "{\n \"customers\": [\n {\n \"name\": null,\n \"links\": {\n \"source\": null,\n \"destination\": - null\n },\n \"updated_at\": \"2014-07-01T11:32:22.451880Z\",\n \"created_at\": - \"2014-07-01T11:32:22.324563Z\",\n \"dob_month\": null,\n \"id\": - \"CU2RCigJCqQDdYQEcThv3Jxr\",\n \"phone\": null,\n \"href\": \"/customers/CU2RCigJCqQDdYQEcThv3Jxr\",\n + null\n },\n \"updated_at\": \"2014-07-01T15:43:44.133689Z\",\n \"created_at\": + \"2014-07-01T15:43:43.910534Z\",\n \"dob_month\": null,\n \"id\": + \"CU3KXdyvNSDeyLP3pAWr9hqd\",\n \"phone\": null,\n \"href\": \"/customers/CU3KXdyvNSDeyLP3pAWr9hqd\",\n \ \"merchant_status\": \"no-match\",\n \"meta\": {\n \"seq\": \"1\"\n },\n \"dob_year\": null,\n \"address\": {\n \"city\": null,\n \"line2\": null,\n \"line1\": null,\n \"state\": @@ -114,17 +114,17 @@ interactions: \ \"cvv_result\": null,\n \"number\": \"xxxxxxxxxxxx1111\",\n \"avs_postal_match\": \"no\",\n \"expiration_month\": 10,\n \"meta\": {\n \"region\": \"Confusion\",\n \"city_town\": \"\",\n \"address_2\": \"Box - 2\"\n },\n \"id\": \"CC2SGPDNPBU0oOKbaes9tqC1\",\n \"category\": + 2\"\n },\n \"id\": \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"category\": \"other\",\n \"type\": \"credit\",\n \"cvv_match\": null,\n \"bank_name\": \"JPMORGAN CHASE BANK, N.A.\",\n \"avs_street_match\": \"yes\",\n \"brand\": - \"Visa\",\n \"updated_at\": \"2014-07-01T11:32:23.284439Z\",\n \"address\": + \"Visa\",\n \"updated_at\": \"2014-07-01T15:43:45.463915Z\",\n \"address\": {\n \"city\": null,\n \"line2\": null,\n \"line1\": \"123 Main Street\",\n \"state\": \"Confusion\",\n \"postal_code\": \"90210\",\n \"country_code\": null\n },\n \"can_debit\": true,\n \"name\": null,\n \"expiration_year\": 2020,\n \"cvv\": null,\n \"is_verified\": true,\n \"avs_result\": \"Street address and postal code do not match.\",\n \"can_credit\": false,\n \"href\": - \"/cards/CC2SGPDNPBU0oOKbaes9tqC1\",\n \"created_at\": \"2014-07-01T11:32:23.284437Z\"\n + \"/cards/CC3MHBsW6vHaL3suLVdTVbO9\",\n \"created_at\": \"2014-07-01T15:43:45.463913Z\"\n \ }\n ],\n \"links\": {\n \"cards.card_holds\": \"/cards/{cards.id}/card_holds\",\n \ \"cards.customer\": \"/customers/{cards.customer}\",\n \"cards.disputes\": \"/cards/{cards.id}/disputes\",\n \"cards.debits\": \"/cards/{cards.id}/debits\"\n @@ -137,38 +137,38 @@ interactions: content-type: [application/json] status: {code: 201, message: CREATED} - request: - body: '{"links": {"customer": "/customers/CU2RCigJCqQDdYQEcThv3Jxr"}, "cvv_result": + body: '{"links": {"customer": "/customers/CU3KXdyvNSDeyLP3pAWr9hqd"}, "cvv_result": null, "number": "xxxxxxxxxxxx1111", "expiration_month": 10, "meta": {"region": - "Confusion", "city_town": "", "address_2": "Box 2"}, "id": "CC2SGPDNPBU0oOKbaes9tqC1", + "Confusion", "city_town": "", "address_2": "Box 2"}, "id": "CC3MHBsW6vHaL3suLVdTVbO9", "category": "other", "is_verified": true, "type": "credit", "cvv_match": null, "bank_name": "JPMORGAN CHASE BANK, N.A.", "avs_street_match": "yes", "brand": - "Visa", "updated_at": "2014-07-01T11:32:23.284439Z", "fingerprint": "8c7f0423365af88c3e36cf02746eca64fdcf36ddc2e1f398c7ec9f3ffd05a267", + "Visa", "updated_at": "2014-07-01T15:43:45.463915Z", "fingerprint": "8c7f0423365af88c3e36cf02746eca64fdcf36ddc2e1f398c7ec9f3ffd05a267", "can_debit": true, "name": null, "expiration_year": 2020, "can_credit": false, "avs_postal_match": "no", "avs_result": "Street address and postal code do not - match.", "cvv": null, "created_at": "2014-07-01T11:32:23.284437Z", "address": + match.", "cvv": null, "created_at": "2014-07-01T15:43:45.463913Z", "address": {"city": null, "line2": null, "line1": "123 Main Street", "state": "Confusion", "postal_code": "90210", "country_code": null}}' headers: {} method: PUT - uri: https://api.balancedpayments.com:443/cards/CC2SGPDNPBU0oOKbaes9tqC1 + uri: https://api.balancedpayments.com:443/cards/CC3MHBsW6vHaL3suLVdTVbO9 response: body: string: !!binary | - H4sIAAAAAAAAA41U207jMBB95yusPEObOKFN+1YKYgWi3FdaVqvI9aW1SO1iO91WqP++tpM0CbDa - 9UOkzMVz5szxvB8BEGCkiA7G4Kf9AeDdf6055+LVmWuDiyy0kSuqrDWYPsOHKV9cTd/uz8mP+wv8 - tNzEV1sVVPn74/oixsWCqr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p/IZxG8p5MTfewav + zk/1fbo7R5dQl5d35PZu/WXeYwQZ+ihV5aKl2VgKDoBNVVBnxooSboYktv0POFwj8ZQJtPVZn6+v + vnz9tFyBs/PlzUdwulxdHIPVaDka8qmNotR0fFZUdwFrhYTv445r1JnLgljUJENeHXEYJSfh9CSM + bqPJIoGLZDKaTaIYRg+9UjVlNr4vTkuwtfR7qFVMHbPvmCNXz94MrhAX4MZD7w/GSsP45t+dZyMd + LImPmYdxFPazsSyFUVXWBLj6b14GRiIjdG3HsQBGlbTTb037YB49PVYUuTcYh3EnSPsYXrUZcJ3t + qOKMU0f7oIAT/+HpBHXvoFEisGMCdXvAoQdEAiEN8CrpDdyhb9S0AAzlusO/UZQ5VsZ+t4z/Q7iK + /kMESQrnEXyo38beUvnTsfVqS9W7bOSqZhuZ+7XWgnjxWEac7D2qxl9T3ub19tu4XXZ63GS2hn0z + 5iaJcF2Uxgr93VIH76CQH/rfMmqfbW5/tP8Dq5w30qEFAAA= headers: content-encoding: [gzip] - content-length: ['661'] + content-length: ['662'] content-type: [application/json] status: {code: 200, message: OK} - request: @@ -179,9 +179,9 @@ interactions: response: body: {string: !!python/unicode "{\n \"customers\": [\n {\n \"name\": null,\n \"links\": {\n \"source\": null,\n \"destination\": - null\n },\n \"updated_at\": \"2014-07-01T11:32:24.889772Z\",\n \"created_at\": - \"2014-07-01T11:32:24.783468Z\",\n \"dob_month\": null,\n \"id\": - \"CU2Uomy8gvhh6SdpAqQO2wHv\",\n \"phone\": null,\n \"href\": \"/customers/CU2Uomy8gvhh6SdpAqQO2wHv\",\n + null\n },\n \"updated_at\": \"2014-07-01T15:43:46.754060Z\",\n \"created_at\": + \"2014-07-01T15:43:46.652179Z\",\n \"dob_month\": null,\n \"id\": + \"CU3O2IKYocPZ5LA7GkZWpwKZ\",\n \"phone\": null,\n \"href\": \"/customers/CU3O2IKYocPZ5LA7GkZWpwKZ\",\n \ \"merchant_status\": \"no-match\",\n \"meta\": {\n \"seq\": \"2\"\n },\n \"dob_year\": null,\n \"address\": {\n \"city\": null,\n \"line2\": null,\n \"line1\": null,\n \"state\": @@ -213,13 +213,13 @@ interactions: \"121042882\",\n \"bank_name\": \"WELLS FARGO BANK NA\",\n \"account_type\": \"checking\",\n \"name\": \"Homer Jay\",\n \"links\": {\n \"customer\": null,\n \"bank_account_verification\": null\n },\n \"can_credit\": - true,\n \"created_at\": \"2014-07-01T11:32:25.564498Z\",\n \"fingerprint\": + true,\n \"created_at\": \"2014-07-01T15:43:49.076855Z\",\n \"fingerprint\": \"dac6514d9dd3a1cd7ac925d5749e0308c2c65fa27c506aefb0c9b21611ff9969\",\n \"updated_at\": - \"2014-07-01T11:32:25.564501Z\",\n \"href\": \"/bank_accounts/BA2Vg7rBg6MrZmOr6xyqEYcd\",\n + \"2014-07-01T15:43:49.076857Z\",\n \"href\": \"/bank_accounts/BA3QLnsEGgrsjqfhXh43Pq4d\",\n \ \"meta\": {},\n \"account_number\": \"xxx233a\",\n \"address\": {\n \"city\": null,\n \"line2\": null,\n \"line1\": null,\n \ \"state\": null,\n \"postal_code\": null,\n \"country_code\": - null\n },\n \"can_debit\": false,\n \"id\": \"BA2Vg7rBg6MrZmOr6xyqEYcd\"\n + null\n },\n \"can_debit\": false,\n \"id\": \"BA3QLnsEGgrsjqfhXh43Pq4d\"\n \ }\n ],\n \"links\": {\n \"bank_accounts.credits\": \"/bank_accounts/{bank_accounts.id}/credits\",\n \ \"bank_accounts.bank_account_verifications\": \"/bank_accounts/{bank_accounts.id}/verifications\",\n \ \"bank_accounts.customer\": \"/customers/{bank_accounts.customer}\",\n @@ -235,28 +235,28 @@ interactions: status: {code: 201, message: CREATED} - request: body: '{"routing_number": "121042882", "bank_name": "WELLS FARGO BANK NA", "account_type": - "checking", "name": "Homer Jay", "links": {"customer": "/customers/CU2Uomy8gvhh6SdpAqQO2wHv"}, - "can_credit": true, "created_at": "2014-07-01T11:32:25.564498Z", "fingerprint": + "checking", "name": "Homer Jay", "links": {"customer": "/customers/CU3O2IKYocPZ5LA7GkZWpwKZ"}, + "can_credit": true, "created_at": "2014-07-01T15:43:49.076855Z", "fingerprint": "dac6514d9dd3a1cd7ac925d5749e0308c2c65fa27c506aefb0c9b21611ff9969", "updated_at": - "2014-07-01T11:32:25.564501Z", "meta": {}, "account_number": "xxx233a", "address": + "2014-07-01T15:43:49.076857Z", "meta": {}, "account_number": "xxx233a", "address": {"city": null, "line2": null, "line1": null, "state": null, "postal_code": null, - "country_code": null}, "can_debit": false, "id": "BA2Vg7rBg6MrZmOr6xyqEYcd"}' + "country_code": null}, "can_debit": false, "id": "BA3QLnsEGgrsjqfhXh43Pq4d"}' headers: {} method: PUT - uri: https://api.balancedpayments.com:443/bank_accounts/BA2Vg7rBg6MrZmOr6xyqEYcd + uri: https://api.balancedpayments.com:443/bank_accounts/BA3QLnsEGgrsjqfhXh43Pq4d response: body: string: !!binary | - H4sIAAAAAAAAA5VTW2+bMBh9769APK8Bm3veyNSt2rpGW9dW6zQhY5sEhVuNSYMi/vtsCuXSdOpe - /ODzcTiXz8czRVFDlO0ChHFeZbxUl8pvcakox/YUMMsrHmebIKvSkDKBqwAC3YSuC9UP/VDLkaGU - Svz+4urqRvnk//i8Vlb+9Vfl2h8mux8FvC7aYbyleCf4h4me5jJPKVO+oHqAkjjbSYm9OCEPVyWX - g5Lr4y28zdPa3ey3W/uGFP7j9zV8uty/EMzcBnvK4ijGiMd5JgiyKkk6R82LNYyyADNKYi4mOKvo - gDCKOCUBkogKdWCe6865Dn4CsDTgEloLyzZNz30YDETCKWUFi7P2G4KwbQGTeIQYCGDiIOxBi1iO - 6VHd0F0MBR4h6GBLtxGNQh17IQQ2AFHkebY3EFcF+acWewFtz7LMkZYto5EUoU0WQFv58G7jsNXG - /sYe0jWzD/XjxS9Mhn+llCNZwpBRX+qwI4fDARoGGvVOCKPlvLyY113ufaqiItEyhaevwevrkgvj - r6+LXABJgHNyAmx3ndVj9GTvhIZt7RFKyqH3mMjY3sypZWrE+Ud6km5GOzt9bYvnxZKpzGs4TlpZ - xKTR+uHnqGZM4/HJXr+TfPwUyq62udjRU9P6d1dqM6U90JwmaSN9p6Zu9v/8tllO3MwVvhlVo4rC - mrPmL7GaaGsXBQAA + H4sIAAAAAAAAA5VTW2+bMBh9769APK+JbW4hb3Tqsi1R293ULdOEjG0aFmKoMV2iiP8+m0K5NNW6 + Fx58Po7P5fPxzDDMCPNtiAnJSi4Lc278VIeGcay/ChZZKRN+F/JyFzGhcBMiCGw0myHzTTtUc3C8 + Yxq/vVytvhjvgs+La+MiuFoaV0E32VwUykNeD5MNI1vF3020NO+zHRPGR3zooDThWy2xFafkkbKQ + elBzvf1mXaMPyx8ZuVk7q8BbbNe3+Z/l+olg5DZ8YCKJE4JlknFFwMs0bRxVT9YI5iERjCZSTUhR + sg4RDEtGQ6wREwFonwPvHMCv0Jnb1tz2J8BzZ47T3W/GyikTuUh4/Q/FxHWgTX1KLQwJ9TDxkUMd + z/YZsMCMIIXHGHnEAS5mcQSIHyHoQhjHvu/6XTJlTv+hxQGeA/paNoLFWsR0sADTi8D6tOLF5eJO + FL/v4833jW3d3Nu0u2vHJNYldBm1pXY7st/vkWXhXu+UClaMy0vkocm9TVVVpFpm6PQxfH5cSGX8 + +XGeKSANSUZPgPWui0MfPdk7ZVFde4zTous9oTq2F3OqmSr1/aU9aTe9nR2+tsnjYulUxjUcB61M + ElpN2+HHqEZM/fHBXr+SvP8Uiqa2sdjeU5u2766YjpS2QHWapI70lZqa2f/zW2c5cDNW+GJUlakK + q86qvyivOQsXBQAA headers: content-encoding: [gzip] content-length: ['525'] diff --git a/tests/py/fixtures/TestBalancedBankAccount.yml b/tests/py/fixtures/TestBalancedBankAccount.yml index ab996e2f9a..ffe7ccd3ef 100644 --- a/tests/py/fixtures/TestBalancedBankAccount.yml +++ b/tests/py/fixtures/TestBalancedBankAccount.yml @@ -3,44 +3,44 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2Uomy8gvhh6SdpAqQO2wHv + uri: https://api.balancedpayments.com:443/customers/CU3O2IKYocPZ5LA7GkZWpwKZ response: body: string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIUoxY9S3opbeiaHJpUQg0yUREJFLhw6lh6N+7lCWZJtWw - Fx12Z4bc2RFPN0mSYqO0aKlU6S75BYUkOQ1faHHUUqhy0zSfplrD+KuFTiCAKWEk9oFQJ1RpxpFm - go8qo0g/q5mOIE1JhTQg0mKdb1br7WqdP+b57q7YFZvbsvy83RY/05mCJY1QtuXd5r50KETsq1Zw - XfvDMGKP/fJUPIn2WL4c6vr+B+ke3r5/K96/Hi5ndrXg/oBpLemzpWezg1lcCYzGNeK6UhppY41M - uVi1SOP6clxLNfIspm+DQWngoJ3tSJH0R0OESKq8TWGmjx4Q9gQrpcVyOQ/L9uK+FyDSCWg0FRZk - oYmF4Voe3W4wyN4ouIdS1VLqlOJVg5Te+GPSFrEmKLKrwPVw1m+bHzupE95L9G/nCKcZuDbkWWWn - ebFjvx9X5BAxkqSqRUOGVTpRcMiM9JmDOyfZ0dgj/lohPJgUkbmGBkqE7llMYsQscN2/9R8+OL/0 - ghn0j6aSQwr+b5gQHlzK2hax5AwJmISpzmgaIc+ogK8l4gph+3hFNK6QgQ48EobHZphAC+wDvMyo - iVxB0gkWKAhJzm/7B+EcMQEXnloSzdMEgv+rv+n/AqhHO/tTBgAA + H4sIAAAAAAAAA41UTY/TMBS876+IcqabpJu2orcVB4QWCQ4gRBGKXNsoVhM7+AOoqvx3ntMk69oB + 7yWH55mJ37zxu9wlSYqN0qKlUqX75BsUkuQyfOGIo5ZClZumeTXVGsZPFjqBAKaEkdgHQp1QpRlH + mgk+qowi/axmOoI0JRXSgEjXeVGu8t0qLz4Vm335sC+397tNmW/zQzpTsKQRynazLnavHQoRx6oV + XNd+M4zY3775/PBh/e7pq8AfD5v3j7u3p8OX7veTI9DVgvsNprWkPyw9mx3M4kpgNK4R15XSSBtr + ZMrFqkUa188ttlQjz2L6czAoDRy0vZ0pkn5riBBJlTcpzPTZA8KcYKR0vVwuwrK9uO8FiHQCDpoK + C7JwiIXhWp7d06CRo1FwD6WqpdQpxasGKV36bdIWsSYospvA9fCv7zY/tlMnvM/Rv58jnGbg2pBn + lV3mwY7n/Tgih4iRJFUtGjKM0omCQ2akzxzcNcmOxhHxU4XwYFJE5hYaKBF6ZDGJEbPAdV/rP3xw + nvSCGfSPppJDCl7WTAgPLmVti1hyhQRMwlRnNI2QZ1TA1xJxhbBdXhGNG2SgA0vC8FgPE2iB/Qs2 + M2oiV5B0ggUKQpLrbv9POEdMwIVVS6J5mkDwvvq7/i9xeE/EUwYAAA== headers: content-encoding: [gzip] - content-length: ['495'] + content-length: ['496'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2Uomy8gvhh6SdpAqQO2wHv/bank_accounts?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3O2IKYocPZ5LA7GkZWpwKZ/bank_accounts?is_valid=True&limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA7VUXW/aMBR976+I8tCnFWKTBIKEJpi6VVtXtLXdtE5TZGwHLPJVx2EglP8+2yQk - oWTqS18icc/1veeec7n7C8MwFyhe+wjjJI9FZo6N3zJoGHv9lTBPcsHipR/n0YJyiZsAAsuGoxE0 - 31VJukaMIqrwn9e3t/fGx+n3T3NjNr37YtxN68yykS92qU7GK4rXsn6dUZW5SSLKjc9oV0Mhi9eK - YkVO0sN5JlSiqvXhET4m0W603KxW7j1Jp8/f5vDvzeZY4GRaf0M5CxhGgiWxLBDnYVhOVBxHwyj2 - MaeECZkheE5rhFMkKPGRQkxoAfvKGl5Z4AGA8QCOodNzXNv2Rk/1AIGclPKUs1i/IQi7DrCJR8gA - AUyGCHvQIc7Q9qg1sEYYSjxAcIgdy0U0WFjYW0DgAhAEnud6deE8Jf/l4vag6zmO3eCy4jRQJPqt - BejPpvDHcshnS/crf4rm3N3unq9/YVL3i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3G8REKh1S78pnEeNvJY4UX2+r2q3GBWnfvktttyJ5+J/YtP4il4xsrTK3pN7G + m79aN+aVtZtnKa+Mbbdonr3GLh0QrbK2J4ros/ZKUrsbeILOyYm1mK15rAOOJ59uTeXa2fYfmxyH + ZKUGAAA= headers: content-encoding: [gzip] content-length: ['632'] @@ -50,22 +50,22 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2Uomy8gvhh6SdpAqQO2wHv/bank_accounts?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3O2IKYocPZ5LA7GkZWpwKZ/bank_accounts?is_valid=True&limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA7VUXW/aMBR976+I8tCnFWKTBIKEJpi6VVtXtLXdtE5TZGwHLPJVx2EglP8+2yQk - oWTqS18icc/1veeec7n7C8MwFyhe+wjjJI9FZo6N3zJoGHv9lTBPcsHipR/n0YJyiZsAAsuGoxE0 - 31VJukaMIqrwn9e3t/fGx+n3T3NjNr37YtxN68yykS92qU7GK4rXsn6dUZW5SSLKjc9oV0Mhi9eK - YkVO0sN5JlSiqvXhET4m0W603KxW7j1Jp8/f5vDvzeZY4GRaf0M5CxhGgiWxLBDnYVhOVBxHwyj2 - MaeECZkheE5rhFMkKPGRQkxoAfvKGl5Z4AGA8QCOodNzXNv2Rk/1AIGclPKUs1i/IQi7DrCJR8gA - AUyGCHvQIc7Q9qg1sEYYSjxAcIgdy0U0WFjYW0DgAhAEnud6deE8Jf/l4vag6zmO3eCy4jRQJPqt - BejPpvDHcshnS/crf4rm3N3unq9/YVL3iqhAyoRao8rUeke22y0cDFDDd0I4zU7NY2JX6l6pKi2S - LlN4PgxehjMhB38ZThMJhD5OyBlQ7zrfNdGzvhO60LYHKMxq3xlRsnXqpCsV8vtHzWRWaumwGaJM - O9+v9jbrd21t25f3LPM3KGRk8iB38DJkERMTYF0mQZBRMbFKpc2YblUDtcoHSc2jz2/VUnORPYFV - djxwkpEqkHK6YUmu3G8QE4l0SL0rnwWMv5U4Uny9rWq3Ghekfft62m5F8vQ/sW/9RXqMFP0yt6Te - xpu/WjfmlbWbZymrjG23aJ69xi6dEK2yio4i+qy9ktThBnbQ6ZxYi9map3/CsfNpYSrXLop/NxcR - yKUGAAA= + H4sIAAAAAAAAA7VUXW/aMBR976+I8tCntbHzQQgSmujUsQ3UdlunbkxTZGyneIQkdRwKQvz32SYh + CQWtL32JxD3X9557zuVuzgzDnKJkHiKM0yIRudkzfsugYWz0V8I8LQRLHsOkWEwpl7gJbQhcu9u1 + zXdVkq6RoAVV+MP1ePzd+Dj4Nrw1rgY3I+NmUGeWjUKxznQynlE8l/XrjKrMp3RBufEFrWsoZslc + UazISXq4yIVKVLU+/HBu7c+jXym+m3jjgT+cTx6y59FkX+Bg2nBJOYsYRoKliSyQFHFcTrTdj4ZR + EmJOCRMyQ/CC1ginSFASIoWYNoDuBfAvALyHXs91em5wCfxO1/Pq/mYkJ6U84yzRbwjCHQ+6JCDE + QRATH+HA9ojnuwEFDuhiW+IRsn3sgQ6i0RTgYGrDDoRRFASdoFamyMh/uHjA90CTy4zTSJGwWgtg + XQ2cr+Mkvx4+8vzvUzT7OXOduyeX1L0WVCBlQq1RZWq9I6vVynYc1PCdEE7zQ/OYWJe6V6pKi6TL + 1D4ehi/DuZCDvwxnqQTiEKfkCKh3na+b6FHfCZ1q2yMU57XvjCjZTuqkK23l94+ayazU0mEzRrl2 + 3qr2NrdObW3bl/csD5coZqR/L3fwPGYLJvoQnKdRlFPRB6XSZkJXqoFa5Z2k5t7nt2qpucieEJQd + d5xkpApknC5ZWij3G8REKh1S78pnEeNvJY4UX2+r2q3GBWnfvktttyJ5+J/YtP4il4xsrTK3pN7G + m79aN+aVtZtnKa+Mbbdonr3GLh0QrbK2J4ros/ZKUrsbeILOyYm1mK15rAOOJ59uTeXa2fYfmxyH + ZKUGAAA= headers: content-encoding: [gzip] content-length: ['632'] @@ -75,66 +75,66 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2Uomy8gvhh6SdpAqQO2wHv + uri: https://api.balancedpayments.com:443/customers/CU3O2IKYocPZ5LA7GkZWpwKZ response: body: string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIUoxY9S3opbeiaHJpUQg0yUREJFLhw6lh6N+7lCWZJtWw - Fx12Z4bc2RFPN0mSYqO0aKlU6S75BYUkOQ1faHHUUqhy0zSfplrD+KuFTiCAKWEk9oFQJ1RpxpFm - go8qo0g/q5mOIE1JhTQg0mKdb1br7WqdP+b57q7YFZvbsvy83RY/05mCJY1QtuXd5r50KETsq1Zw - XfvDMGKP/fJUPIn2WL4c6vr+B+ke3r5/K96/Hi5ndrXg/oBpLemzpWezg1lcCYzGNeK6UhppY41M - uVi1SOP6clxLNfIspm+DQWngoJ3tSJH0R0OESKq8TWGmjx4Q9gQrpcVyOQ/L9uK+FyDSCWg0FRZk - oYmF4Voe3W4wyN4ouIdS1VLqlOJVg5Te+GPSFrEmKLKrwPVw1m+bHzupE95L9G/nCKcZuDbkWWWn - ebFjvx9X5BAxkqSqRUOGVTpRcMiM9JmDOyfZ0dgj/lohPJgUkbmGBkqE7llMYsQscN2/9R8+OL/0 - ghn0j6aSQwr+b5gQHlzK2hax5AwJmISpzmgaIc+ogK8l4gph+3hFNK6QgQ48EobHZphAC+wDvMyo - iVxB0gkWKAhJzm/7B+EcMQEXnloSzdMEgv+rv+n/AqhHO/tTBgAA + H4sIAAAAAAAAA41UTY/TMBS876+IcqabpJu2orcVB4QWCQ4gRBGKXNsoVhM7+AOoqvx3ntMk69oB + 7yWH55mJ37zxu9wlSYqN0qKlUqX75BsUkuQyfOGIo5ZClZumeTXVGsZPFjqBAKaEkdgHQp1QpRlH + mgk+qowi/axmOoI0JRXSgEjXeVGu8t0qLz4Vm335sC+397tNmW/zQzpTsKQRynazLnavHQoRx6oV + XNd+M4zY3775/PBh/e7pq8AfD5v3j7u3p8OX7veTI9DVgvsNprWkPyw9mx3M4kpgNK4R15XSSBtr + ZMrFqkUa188ttlQjz2L6czAoDRy0vZ0pkn5riBBJlTcpzPTZA8KcYKR0vVwuwrK9uO8FiHQCDpoK + C7JwiIXhWp7d06CRo1FwD6WqpdQpxasGKV36bdIWsSYospvA9fCv7zY/tlMnvM/Rv58jnGbg2pBn + lV3mwY7n/Tgih4iRJFUtGjKM0omCQ2akzxzcNcmOxhHxU4XwYFJE5hYaKBF6ZDGJEbPAdV/rP3xw + nvSCGfSPppJDCl7WTAgPLmVti1hyhQRMwlRnNI2QZ1TA1xJxhbBdXhGNG2SgA0vC8FgPE2iB/Qs2 + M2oiV5B0ggUKQpLrbv9POEdMwIVVS6J5mkDwvvq7/i9xeE/EUwYAAA== headers: content-encoding: [gzip] - content-length: ['495'] + content-length: ['496'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2Uomy8gvhh6SdpAqQO2wHv + uri: https://api.balancedpayments.com:443/customers/CU3O2IKYocPZ5LA7GkZWpwKZ response: body: string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIUoxY9S3opbeiaHJpUQg0yUREJFLhw6lh6N+7lCWZJtWw - Fx12Z4bc2RFPN0mSYqO0aKlU6S75BYUkOQ1faHHUUqhy0zSfplrD+KuFTiCAKWEk9oFQJ1RpxpFm - go8qo0g/q5mOIE1JhTQg0mKdb1br7WqdP+b57q7YFZvbsvy83RY/05mCJY1QtuXd5r50KETsq1Zw - XfvDMGKP/fJUPIn2WL4c6vr+B+ke3r5/K96/Hi5ndrXg/oBpLemzpWezg1lcCYzGNeK6UhppY41M - uVi1SOP6clxLNfIspm+DQWngoJ3tSJH0R0OESKq8TWGmjx4Q9gQrpcVyOQ/L9uK+FyDSCWg0FRZk - oYmF4Voe3W4wyN4ouIdS1VLqlOJVg5Te+GPSFrEmKLKrwPVw1m+bHzupE95L9G/nCKcZuDbkWWWn - ebFjvx9X5BAxkqSqRUOGVTpRcMiM9JmDOyfZ0dgj/lohPJgUkbmGBkqE7llMYsQscN2/9R8+OL/0 - ghn0j6aSQwr+b5gQHlzK2hax5AwJmISpzmgaIc+ogK8l4gph+3hFNK6QgQ48EobHZphAC+wDvMyo - iVxB0gkWKAhJzm/7B+EcMQEXnloSzdMEgv+rv+n/AqhHO/tTBgAA + H4sIAAAAAAAAA41UTY/TMBS876+IcqabpJu2orcVB4QWCQ4gRBGKXNsoVhM7+AOoqvx3ntMk69oB + 7yWH55mJ37zxu9wlSYqN0qKlUqX75BsUkuQyfOGIo5ZClZumeTXVGsZPFjqBAKaEkdgHQp1QpRlH + mgk+qowi/axmOoI0JRXSgEjXeVGu8t0qLz4Vm335sC+397tNmW/zQzpTsKQRynazLnavHQoRx6oV + XNd+M4zY3775/PBh/e7pq8AfD5v3j7u3p8OX7veTI9DVgvsNprWkPyw9mx3M4kpgNK4R15XSSBtr + ZMrFqkUa188ttlQjz2L6czAoDRy0vZ0pkn5riBBJlTcpzPTZA8KcYKR0vVwuwrK9uO8FiHQCDpoK + C7JwiIXhWp7d06CRo1FwD6WqpdQpxasGKV36bdIWsSYospvA9fCv7zY/tlMnvM/Rv58jnGbg2pBn + lV3mwY7n/Tgih4iRJFUtGjKM0omCQ2akzxzcNcmOxhHxU4XwYFJE5hYaKBF6ZDGJEbPAdV/rP3xw + nvSCGfSPppJDCl7WTAgPLmVti1hyhQRMwlRnNI2QZ1TA1xJxhbBdXhGNG2SgA0vC8FgPE2iB/Qs2 + M2oiV5B0ggUKQpLrbv9POEdMwIVVS6J5mkDwvvq7/i9xeE/EUwYAAA== headers: content-encoding: [gzip] - content-length: ['495'] + content-length: ['496'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2Uomy8gvhh6SdpAqQO2wHv/bank_accounts?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3O2IKYocPZ5LA7GkZWpwKZ/bank_accounts?is_valid=True&limit=10&offset=0 response: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l/XrjKrMp3RBufEFrWsoZslc + UazISXq4yIVKVLU+/HBu7c+jXym+m3jjgT+cTx6y59FkX+Bg2nBJOYsYRoKliSyQFHFcTrTdj4ZR + EmJOCRMyQ/CC1ginSFASIoWYNoDuBfAvALyHXs91em5wCfxO1/Pq/mYkJ6U84yzRbwjCHQ+6JCDE + QRATH+HA9ojnuwEFDuhiW+IRsn3sgQ6i0RTgYGrDDoRRFASdoFamyMh/uHjA90CTy4zTSJGwWgtg + XQ2cr+Mkvx4+8vzvUzT7OXOduyeX1L0WVCBlQq1RZWq9I6vVynYc1PCdEE7zQ/OYWJe6V6pKi6TL + 1D4ehi/DuZCDvwxnqQTiEKfkCKh3na+b6FHfCZ1q2yMU57XvjCjZTuqkK23l94+ayazU0mEzRrl2 + 3qr2NrdObW3bl/csD5coZqR/L3fwPGYLJvoQnKdRlFPRB6XSZkJXqoFa5Z2k5t7nt2qpucieEJQd + d5xkpApknC5ZWij3G8REKh1S78pnEeNvJY4UX2+r2q3GBWnfvktttyJ5+J/YtP4il4xsrTK3pN7G + m79aN+aVtZtnKa+Mbbdonr3GLh0QrbK2J4ros/ZKUrsbeILOyYm1mK15rAOOJ59uTeXa2fYfmxyH + ZKUGAAA= headers: content-encoding: [gzip] content-length: ['632'] @@ -144,22 +144,22 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2Uomy8gvhh6SdpAqQO2wHv/bank_accounts?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3O2IKYocPZ5LA7GkZWpwKZ/bank_accounts?is_valid=True&limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA7VUXW/aMBR976+I8tCnFWKTBIKEJpi6VVtXtLXdtE5TZGwHLPJVx2EglP8+2yQk - oWTqS18icc/1veeec7n7C8MwFyhe+wjjJI9FZo6N3zJoGHv9lTBPcsHipR/n0YJyiZsAAsuGoxE0 - 31VJukaMIqrwn9e3t/fGx+n3T3NjNr37YtxN68yykS92q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3sgQ6i0RTgYGrDDoRRFASdoFamyMh/uHjA90CTy4zTSJGwWgtg + XQ2cr+Mkvx4+8vzvUzT7OXOduyeX1L0WVCBlQq1RZWq9I6vVynYc1PCdEE7zQ/OYWJe6V6pKi6TL + 1D4ehi/DuZCDvwxnqQTiEKfkCKh3na+b6FHfCZ1q2yMU57XvjCjZTuqkK23l94+ayazU0mEzRrl2 + 3qr2NrdObW3bl/csD5coZqR/L3fwPGYLJvoQnKdRlFPRB6XSZkJXqoFa5Z2k5t7nt2qpucieEJQd + d5xkpApknC5ZWij3G8REKh1S78pnEeNvJY4UX2+r2q3GBWnfvktttyJ5+J/YtP4il4xsrTK3pN7G + m79aN+aVtZtnKa+Mbbdonr3GLh0QrbK2J4ros/ZKUrsbeILOyYm1mK15rAOOJ59uTeXa2fYfmxyH + ZKUGAAA= headers: content-encoding: [gzip] content-length: ['632'] diff --git a/tests/py/fixtures/TestBalancedCard.yml b/tests/py/fixtures/TestBalancedCard.yml index 9a84ae73af..1e6607ec3d 100644 --- a/tests/py/fixtures/TestBalancedCard.yml +++ b/tests/py/fixtures/TestBalancedCard.yml @@ -3,250 +3,250 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd response: body: string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIkp028NXtJbcU6aEtCmFNshURiXT4CGIY+vcubUmmSaXs - RYfdmSF3dsTjTZblxGojO6Z0vsl+YiHLjqcvtgR0DKvCtu2HsdZy8eygIwhhWlpFQiDWKdOGCzBc - ikFlEOknNbunYBitwSAir5blerH8tFiWT2W5WVWbqrpd35X398sf+UQhiiUoq2p993HlUajc1Z0U - pgmH4dQdu/1Wfd3yPw/bl8fP9PvjF/LUvK4e3tTlzH0jRThg3ij229GLycEirYRGkwaEqbUBY52R - uZCLDgxpLsd1zEBgMXtx0DKPHHSzHRiocDSgVDEdbIpwcwiAuCdcKavmy2VcdhcPvUCRvcRGWxNJ - Z5pEWmHUwe9Gg+ysxntoXc+lTmtRt6DNOhyTdcDbqMivAtfjWb9cftykXngv0b+dIpwX6Nopz7o4 - Tosd+v2wIo9IQNG6kS09rdKLgkfmtC883DnJnsYOxHMN5GRSQuYaGilRtuMpiQEzw/X/1nd88H7p - GTPYm2FKYAr+b5gYHl3K2Zaw5AyJmJTrvTUsQZ5QEd8oEBqIe7wSGlfISAcfCStSM4ygGfYrvszQ - Jq6g2AiLFKSi57f9H+EcMBEXn1qazNMIwv+rv+n/AoxtLhJTBgAA + H4sIAAAAAAAAA41Uy27bMBC85ysEnWvLipQ29i1oby2CAG3RokUh0CQLEZFIhY+ggqF/79KWZJpU + wlx02J0ZcmdHPFwlSYqN0qKlUqW75DcUkuRw/EKLo5ZClZumeTfVGsYfLXQCAUwJI7EPhDqhSjOO + NBN8VBlFhlnNdARpSiqkAZFeb/Jytfmw2uTf8ptdWezKcp0Xxfvb7a90pmBJX6UU622+uSlKh0LE + vmoF17U/DCP22I/fi88/Sf98//UT7b88FN3dD7mtn8j5zK4W3B8wrSX9a+nZ7GAWVwKjcY24rpRG + 2lgjUy5WLdK4Ph/XUo08i+mTheZp4KCdradI+qMhQiRV3qYw070HhD3BSun1cjkPy/bivhcg0glo + NBUWZKGJheFa9m43GGRvFNxDqWopdUrxqkFKl/6YtEWsCYrsInADnPXH5sdO6oT3HP31HOE0A9eO + eVbZYV7s2B/GFTlEjCSpatGQ4yqdKDhkRobMwZ2S7GjsEX+sED6aFJG5hAZKhO5ZTGLELHDdv/UF + H5xfesEM+k9TySEFbxsmhAeXsrZFLDlBAiZhqjOaRsgzKuBribhC2D5eEY0LZKADj4ThsRkm0AL7 + GV5m1ESuIOkECxSEJKe3/ZVwjpiAC08tieZpAsH/NVwN/wHQiK4AUwYAAA== headers: content-encoding: [gzip] - content-length: ['495'] + content-length: ['499'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/cards?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?is_valid=True&limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA61VWU/jMBB+51dYeeAJ2sQpvSS0KgWxAlHulZbVKnJ9tBapXWyn2wr1v6/tJE3C - od0H/BApc3hmvvlm/LoHQICRIjoYgl/2B4BX/7XilItnJy4FzjLTRi6ostJg/Ajvxnx2MX65PSU/ - b8/ww3wVX6xVUPhvD8qLGBczqpaKC+Mc+7jHwg6M4+4RYv0+jmncxSyEvU6XYtTtMIJZ3CUEQxqx - eGDNKR6wmDESHiHY7QW7i/FqlSiqs9TdK7I03WlEtpjmaa5rJ7Kn8kYrnSylNihNFsjguctNyEpP - 10uukOFSJAspjNNH4S7CghrUBEfRmbX10EjBMu1+SnOHHTebxMg/3qKuQITYInQCneJErgF8DyEn - /t4xvD+/OZ3cnDyG8vpyiqgemJdxrSaMDJ1JtXHW0swtBLuEzWZJnRgrSrhpgljW38BwisRzItDC - e13cXF3fnY8mYPx9dH8GTkaTywMwaY1aTTy1UZSaCs8N1ZXBVCHh6/jBNarE2ZLYrEmCPDtgGHUO - w95hGD1E0TCGQxi3+v0+7AyeaqFyyKx9nZwWYCup15CzmDpkPxBHLl4EY3CFuAD3PvV6Yyw1jC/+ - w34W1MGSeJtBCKOw7o1lJozaJIWBi/9uMjASCaFT244hMCqjFX9z2Bv9qPFxQ5GbQRjCipB2GN6U - GXCdrKjijFMHeyOAI/9udIK8dlAwEdg2gbw84LIHRAIhDfAsqTXcZV+waQgYSnWV/1xR5lBp+93S - /g/iKvoPEsB+pxP3nvLZ2Foofzu0gsYcBinSnkXtclPZ2J/sqTy1bw4jlHJy/GDx30/5gpvjKNyX - jGlqjsuOBoKum0smqEosluJXhfI52CLKZRPkuVhJ0exgqeiKy8wt54ohgZF2lTm/nEUB4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ftFaTWt8qu122qwqkDWNV6K1L1aNcdaoVr6 + TjA3au/4VDpb4d72LxntgTEXBwAA headers: content-encoding: [gzip] - content-length: ['761'] + content-length: ['762'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/cards?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?is_valid=True&limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA61VWU/jMBB+51dYeeAJ2sQpvSS0KgWxAlHulZbVKnJ9tBapXWyn2wr1v6/tJE3C - od0H/BApc3hmvvlm/LoHQICRIjoYgl/2B4BX/7XilItnJy4FzjLTRi6ostJg/Ajvxnx2MX65PSU/ - b8/ww3wVX6xVUPhvD8qLGBczqpaKC+Mc+7jHwg6M4+4RYv0+jmncxSyEvU6XYtTtMIJZ3CUEQxqx - eGDNKR6wmDESHiHY7QW7i/FqlSiqs9TdK7I03WlEtpjmaa5rJ7Kn8kYrnSylNihNFsjguctNyEpP - 10uukOFSJAspjNNH4S7CghrUBEfRmbX10EjBMu1+SnOHHTebxMg/3qKuQITYInQCneJErgF8DyEn - /t4xvD+/OZ3cnDyG8vpyiqgemJdxrSaMDJ1JtXHW0swtBLuEzWZJnRgrSrhpgljW38BwisRzItDC - e13cXF3fnY8mYPx9dH8GTkaTywMwaY1aTTy1UZSaCs8N1ZXBVCHh6/jBNarE2ZLYrEmCPDtgGHUO - w95hGD1E0TCGQxi3+v0+7AyeaqFyyKx9nZwWYCup15CzmDpkPxBHLl4EY3CFuAD3PvV6Yyw1jC/+ - w34W1MGSeJtBCKOw7o1lJozaJIWBi/9uMjASCaFT244hMCqjFX9z2Bv9qPFxQ5GbQRjCipB2GN6U - GXCdrKjijFMHeyOAI/9udIK8dlAwEdg2gbw84LIHRAIhDfAsqTXcZV+waQgYSnWV/1xR5lBp+93S - /g/iKvoPEsB+px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jG4P/fspWTB/5 + 3r6gVBF9VHcUcrLpLhnYlFgtxY8K5XIwRdTLBpa5GEnVbJhJsmYit8u5YQjUwqwy61eyCFImPxoM + A7hb6y/ehvIF6WGmslybiW8a/+z632N4299pq/RKTftFaTWt8qu122qwqkDWNV6K1L1aNcdaoVr6 + TjA3au/4VDpb4d72LxntgTEXBwAA headers: content-encoding: [gzip] - content-length: ['761'] + content-length: ['762'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd response: body: string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIkp028NXtJbcU6aEtCmFNshURiXT4CGIY+vcubUmmSaXs - RYfdmSF3dsTjTZblxGojO6Z0vsl+YiHLjqcvtgR0DKvCtu2HsdZy8eygIwhhWlpFQiDWKdOGCzBc - ikFlEOknNbunYBitwSAir5blerH8tFiWT2W5WVWbqrpd35X398sf+UQhiiUoq2p993HlUajc1Z0U - pgmH4dQdu/1Wfd3yPw/bl8fP9PvjF/LUvK4e3tTlzH0jRThg3ij229GLycEirYRGkwaEqbUBY52R - uZCLDgxpLsd1zEBgMXtx0DKPHHSzHRiocDSgVDEdbIpwcwiAuCdcKavmy2VcdhcPvUCRvcRGWxNJ - Z5pEWmHUwe9Gg+ysxntoXc+lTmtRt6DNOhyTdcDbqMivAtfjWb9cftykXngv0b+dIpwX6Nopz7o4 - Tosd+v2wIo9IQNG6kS09rdKLgkfmtC883DnJnsYOxHMN5GRSQuYaGilRtuMpiQEzw/X/1nd88H7p - GTPYm2FKYAr+b5gYHl3K2Zaw5AyJmJTrvTUsQZ5QEd8oEBqIe7wSGlfISAcfCStSM4ygGfYrvszQ - Jq6g2AiLFKSi57f9H+EcMBEXn1qazNMIwv+rv+n/AoxtLhJTBgAA + H4sIAAAAAAAAA41Uy27bMBC85ysEnWvLipQ29i1oby2CAG3RokUh0CQLEZFIhY+ggqF/79KWZJpU + wlx02J0ZcmdHPFwlSYqN0qKlUqW75DcUkuRw/EKLo5ZClZumeTfVGsYfLXQCAUwJI7EPhDqhSjOO + NBN8VBlFhlnNdARpSiqkAZFeb/Jytfmw2uTf8ptdWezKcp0Xxfvb7a90pmBJX6UU622+uSlKh0LE + vmoF17U/DCP22I/fi88/Sf98//UT7b88FN3dD7mtn8j5zK4W3B8wrSX9a+nZ7GAWVwKjcY24rpRG + 2lgjUy5WLdK4Ph/XUo08i+mTheZp4KCdradI+qMhQiRV3qYw070HhD3BSun1cjkPy/bivhcg0glo + NBUWZKGJheFa9m43GGRvFNxDqWopdUrxqkFKl/6YtEWsCYrsInADnPXH5sdO6oT3HP31HOE0A9eO + eVbZYV7s2B/GFTlEjCSpatGQ4yqdKDhkRobMwZ2S7GjsEX+sED6aFJG5hAZKhO5ZTGLELHDdv/UF + H5xfesEM+k9TySEFbxsmhAeXsrZFLDlBAiZhqjOaRsgzKuBribhC2D5eEY0LZKADj4ThsRkm0AL7 + GV5m1ESuIOkECxSEJKe3/ZVwjpiAC08tieZpAsH/NVwN/wHQiK4AUwYAAA== headers: content-encoding: [gzip] - content-length: ['495'] + content-length: ['499'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/v1/marketplaces/TEST-MP1wTyxDAJKCaWPjBS4Oli4d/accounts/CU2RCigJCqQDdYQEcThv3Jxr + uri: https://api.balancedpayments.com:443/v1/marketplaces/TEST-MP1wTyxDAJKCaWPjBS4Oli4d/accounts/CU3KXdyvNSDeyLP3pAWr9hqd response: body: string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIkp028NXtJbcU6aEtCmFNshURiXT4CGIY+vcubUmmSaXs - RYfdmSF3dsTjTZblxGojO6Z0vsl+YiHLjqcvtgR0DKvCtu2HsdZy8eygIwhhWlpFQiDWKdOGCzBc - ikFlEOknNbunYBitwSAir5blerH8t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D5eEY0LZKADj4ThsRkm0AL7 + GV5m1ESuIOkECxSEJKe3/ZVwjpiAC08tieZpAsH/NVwN/wHQiK4AUwYAAA== headers: content-encoding: [gzip] - content-length: ['495'] + content-length: ['499'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/cards?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?is_valid=True&limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA61VWU/jMBB+51dYeeAJ2sQpvSS0KgWxAlHulZbVKnJ9tBapXWyn2wr1v6/tJE3C - od0H/BApc3hmvvlm/LoHQICRIjoYgl/2B4BX/7XilItnJy4FzjLTRi6ostJg/Ajvxnx2MX65PSU/ - b8/ww3wVX6xVUPhvD8qLGBczqpaKC+Mc+7jHwg6M4+4RYv0+jmncxSyEvU6XYtTtMIJZ3CUEQxqx - eGDNKR6wmDESHiHY7QW7i/FqlSiqs9TdK7I03WlEtpjmaa5rJ7Kn8kYrnSylNihNFsjguctNyEpP - 10uukOFSJAspjNNH4S7CghrUBEfRmbX10EjBMu1+SnOHHTebxMg/3qKuQITYInQCneJErgF8DyEn - /t4xvD+/OZ3cnDyG8vpyiqgemJdxrSaMDJ1JtXHW0swtBLuEzWZJnRgrSrhpgljW38BwisRzItDC - e13cXF3fnY8mYPx9dH8GTkaTywMwaY1aTTy1UZSaCs8N1ZXBVCHh6/jBNarE2ZLYrEmCPDtgGHUO - w95hGD1E0TCGQxi3+v0+7AyeaqFyyKx9nZwWYCup15CzmDpkPxBHLl4EY3CFuAD3PvV6Yyw1jC/+ - w34W1MGSeJtBCKOw7o1lJozaJIWBi/9uMjASCaFT244hMCqjFX9z2Bv9qPFxQ5GbQRjCipB2GN6U - GXCdrKjijFMHeyOAI/9udIK8dlAwEdg2gbw84LIHRAIhDfAsqTXcZV+waQgYSnWV/1xR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FyLOrXm8rEfmdPlal9shihlOGjG4P/fspWTB/5 + 3r6gVBF9VHcUcrLpLhnYlFgtxY8K5XIwRdTLBpa5GEnVbJhJsmYit8u5YQjUwqwy61eyCFImPxoM + A7hb6y/ehvIF6WGmslybiW8a/+z632N4299pq/RKTftFaTWt8qu122qwqkDWNV6K1L1aNcdaoVr6 + TjA3au/4VDpb4d72LxntgTEXBwAA headers: content-encoding: [gzip] - content-length: ['761'] + content-length: ['762'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/cards?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?is_valid=True&limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA61VWU/jMBB+51dYeeAJ2sQpvSS0KgWxAlHulZbVKnJ9tBapXWyn2wr1v6/tJE3C - od0H/BApc3hmvvlm/LoHQICRIjoYgl/2B4BX/7XilItnJy4FzjLTRi6ostJg/Ajvxnx2MX65PSU/ - b8/ww3wVX6xVUPhvD8qLGBczqpaKC+Mc+7jHwg6M4+4RYv0+jmncxSyEvU6XYtTtMIJZ3CUEQxqx - eGDNKR6wmDESHiHY7QW7i/FqlSiqs9TdK7I03WlEtpjmaa5rJ7Kn8kYrnSylNihNFsjguctNyEpP - 10uukOFSJAspjNNH4S7CghrUBEfRmbX10EjBMu1+SnOHHTebxMg/3qKuQITYInQCneJErgF8DyEn - /t4xvD+/OZ3cnDyG8vpyiqgemJdxrSaMDJ1JtXHW0swtBLuEzWZJnRgrSrhpgljW38BwisRzItDC - e13cXF3fnY8mYPx9dH8GTkaTywMwaY1aTTy1UZSaCs8N1ZXBVCHh6/jBNarE2ZLYrEmCPDtgGHUO - w95hGD1E0TCGQxi3+v0+7AyeaqFyyKx9nZwWYCup15CzmDpkPxBHLl4EY3CFuAD3PvV6Yyw1jC/+ - w34W1MGSeJtBCK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PhYEGRnMPCChpBm + GF6UCZmK10QyyoiFvRPAkn83OrCsHVRMBKZNoCwP2OwBFoALDRxLWg232VdsmgKKUtXkv5SEWlT6 + brf0/4O4kvyDBIMonPjhfTkbWwPlb4sW7MwhTJFyLOrXm8rEfmdPlal9shihlOGjG4P/fspWTB/5 + 3r6gVBF9VHcUcrLpLhnYlFgtxY8K5XIwRdTLBpa5GEnVbJhJsmYit8u5YQjUwqwy61eyCFImPxoM + A7hb6y/ehvIF6WGmslybiW8a/+z632N4299pq/RKTftFaTWt8qu122qwqkDWNV6K1L1aNcdaoVr6 + TjA3au/4VDpb4d72LxntgTEXBwAA headers: content-encoding: [gzip] - content-length: ['761'] + content-length: ['762'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd response: body: string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIkp028NXtJbcU6aEtCmFNshURiXT4CGIY+vcubUmmSaXs - RYfdmSF3dsTjTZblxGojO6Z0vsl+YiHLjqcvtgR0DKvCtu2HsdZy8eygIwhhWlpFQiDWKdOGCzBc - ikFlEOknNbunYBitwSAir5blerH8tFiWT2W5WVWbqrpd35X398sf+UQhiiUoq2p993HlUajc1Z0U - pgmH4dQdu/1Wfd3yPw/bl8fP9PvjF/LUvK4e3tTlzH0jRThg3ij229GLycEirYRGkwaEqbUBY52R - uZCLDgxpLsd1zEBgMXtx0DKPHHSzHRiocDSgVDEdbIpwcwiAuCdcKavmy2VcdhcPvUCRvcRGWxNJ - Z5pEWmHUwe9Gg+ysxntoXc+lTmtRt6DNOhyTdcDbqMivAtfjWb9cftykXngv0b+dIpwX6Nopz7o4 - Tosd+v2wIo9IQNG6kS09rdKLgkfmtC883DnJnsYOxHMN5GRSQuYaGilRtuMpiQEzw/X/1nd88H7p - GTPYm2FKYAr+b5gYHl3K2Zaw5AyJmJTrvTUsQZ5QEd8oEBqIe7wSGlfISAcfCStSM4ygGfYrvszQ - Jq6g2AiLFKSi57f9H+EcMBEXn1qazNMIwv+rv+n/AoxtLhJTBgAA + H4sIAAAAAAAAA41Uy27bMBC85ysEnWvLipQ29i1oby2CAG3RokUh0CQLEZFIhY+ggqF/79KWZJpU + wlx02J0ZcmdHPFwlSYqN0qKlUqW75DcUkuRw/EKLo5ZClZumeTfVGsYfLXQCAUwJI7EPhDqhSjOO + NBN8VBlFhlnNdARpSiqkAZFeb/Jytfmw2uTf8ptdWezKcp0Xxfvb7a90pmBJX6UU622+uSlKh0LE + vmoF17U/DCP22I/fi88/Sf98//UT7b88FN3dD7mtn8j5zK4W3B8wrSX9a+nZ7GAWVwKjcY24rpRG + 2lgjUy5WLdK4Ph/XUo08i+mTheZp4KCdradI+qMhQiRV3qYw070HhD3BSun1cjkPy/bivhcg0glo + NBUWZKGJheFa9m43GGRvFNxDqWopdUrxqkFKl/6YtEWsCYrsInADnPXH5sdO6oT3HP31HOE0A9eO + eVbZYV7s2B/GFTlEjCSpatGQ4yqdKDhkRobMwZ2S7GjsEX+sED6aFJG5hAZKhO5ZTGLELHDdv/UF + H5xfesEM+k9TySEFbxsmhAeXsrZFLDlBAiZhqjOaRsgzKuBribhC2D5eEY0LZKADj4ThsRkm0AL7 + GV5m1ESuIOkECxSEJKe3/ZVwjpiAC08tieZpAsH/NVwN/wHQiK4AUwYAAA== headers: content-encoding: [gzip] - content-length: ['495'] + content-length: ['499'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/cards?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?is_valid=True&limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA61VWU/jMBB+51dYeeAJ2sQpvSS0KgWxAlHulZbVKnJ9tB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Mj8APLuvEaeMP1pxLbCWudJiRaSRwpMf4dlPXKzn159J + cX4VZrM7OVn+wbDy3x7UF1HGH4jMJOPaOo6TEfUGQRhGQ0TH4yQkYZRQLxgNIpKgaEBxQsMI4yQg + Pg0nxpwkExpSir0hCqIR3F2crNexJCpP7b08T9OdhuerRZnmpnV8cxpvtFZxJpRGabxCOlna3Lho + 9GSTMYk0EzxeCa6t3vd2EVZEoy44kjwYWweN4DRX9qc2t9gxXcRaPDmLtgJhbIpQcWAVx2IDgtcQ + MuzuPQkvTo/VXbQ+Reehys9v8c3t4nLSQgRp8iBkYa2FXhoIdgnrIiNWnEiCme6CWNffwXCB+GPM + 0cp5fbu6uPz+dTYHJ6ez6y/geDY/OwDz3qzXxVNpSYhu8CyIagwWEnFXxy1TqBHnGTZZ4xg5dgSe + Pzj0Roeef+MPp4NwOhj2xkM/CP37VqgSMmPfJqcB2EjaNZQsJhbZN8S+jWduBheIcXDtUm83xlBD + u+Lf7GdFnURgZzPxAt9reyci51oWcWVg47+ajATxGJOFaccUaJmThr8l7J1+tPhYEGRnMPCChpBm + GF6UCZmK10QyyoiFvRPAkn83OrCsHVRMBKZNoCwP2OwBFoALDRxLWg232VdsmgKKUtXkv5SEWlT6 + brf0/4O4kvyDBIMonPjhfTkbWwPlb4sW7MwhTJFyLOrXm8rEfmdPlal9shihlOGjG4P/fspWTB/5 + 3r6gVBF9VHcUcrLpLhnYlFgtxY8K5XIwRdTLBpa5GEnVbJhJsmYit8u5YQjUwqwy61eyCFImPxoM + A7hb6y/ehvIF6WGmslybiW8a/+z632N4299pq/RKTftFaTWt8qu122qwqkDWNV6K1L1aNcdaoVr6 + TjA3au/4VDpb4d72LxntgTEXBwAA headers: content-encoding: [gzip] - content-length: ['761'] + content-length: ['762'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/cards?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?is_valid=True&limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA61VWU/jMBB+51dYeeAJ2sQpvSS0KgWxAlHulZbVKnJ9tBapXWyn2wr1v6/tJE3C - od0H/BApc3hmvvlm/LoHQICRIjoYgl/2B4BX/7XilItnJy4FzjLTRi6ostJg/Ajvxnx2MX65PSU/ - b8/ww3wVX6xVUPhvD8qLGBczqpaKC+Mc+7jHwg6M4+4RYv0+jmncxSyEvU6XYtTtMIJZ3CUEQxqx - eGDNKR6wmDESHiHY7QW7i/FqlSiqs9TdK7I03WlEtpjmaa5rJ7Kn8kYrnSylNihNFsjguctNyEpP - 10uukOFSJAspjNNH4S7CghrUBEfRmbX10EjBMu1+SnOHHTebxMg/3qKuQITYInQCneJErgF8DyEn - /t4xvD+/OZ3cnDyG8vpyiqgemJdxrSaMDJ1JtXHW0swtBLuEzWZJnRgrSrhpgljW38BwisRzItDC - e13cXF3fnY8mYPx9dH8GTkaTywMwaY1aTTy1UZSaCs8N1ZXBVCHh6/jBNarE2ZLYrEmCPDtgGHUO - w95hGD1E0TCGQxi3+v0+7AyeaqFyyKx9nZwWYCup15CzmDpkPxBHLl4EY3CFuAD3PvV6Yyw1jC/+ - w34W1MGSeJtBCKOw7o1lJozaJIWBi/9uMjASCaFT244hMCqjFX9z2Bv9qPFxQ5GbQRjCipB2GN6U - GXCdrKjijFMHeyOAI/9udIK8dlAwEdg2gbw84LIHRAIhDfAsqTXcZV+waQgYSnWV/1xR5lBp+93S - /g/iKvoPEsB+pxP3nvLZ2Foofzu0gsYcBinSnkXtclPZ2J/sqTy1bw4jlHJy/GDx30/5gpvjKNyX - jGlqjsuOBoKum0smqEosluJXhfI52CLKZRPkuVhJ0exgqeiKy8wt54ohgZF2lTm/nEUB4+qrwbCA - +7X+5m3IX5AW4XqZGTvxVeNfff9bnGzbO22RXq6pvyi1phV+pXZbDFYRyLkmc5n6V6vkWC1UTd8I - 5kftE59C5yrc2/4F27WBRxcHAAA= + H4sIAAAAAAAAA61VW0/bMBR+51dYfuAJ2lza9CKhqbBpaEBBg8HENEVubFOL1M5spzRC/e+znaRJ + uGh7wA+Rci4+53znO8fPewDABEms4BT8Mj8APLuvEaeMP1pxLbCWudJiRaSRwpMf4dlPXKzn159J + cX4VZrM7OVn+wbDy3x7UF1HGH4jMJOPaOo6TEfUGQRhGQ0TH4yQkYZRQLxgNIpKgaEBxQsMI4yQg + Pg0nxpwkExpSir0hCqIR3F2crNexJCpP7b08T9OdhuerRZnmpnV8cxpvtFZxJpRGabxCOlna3Lho + 9GSTMYk0EzxeCa6t3vd2EVZEoy44kjwYWweN4DRX9qc2t9gxXcRaPDmLtgJhbIpQcWAVx2IDgtcQ + MuzuPQkvTo/VXbQ+Reehys9v8c3t4nLSQgRp8iBkYa2FXhoIdgnrIiNWnEiCme6CWNffwXCB+GPM + 0cp5fbu6uPz+dTYHJ6ez6y/geDY/OwDz3qzXxVNpSYhu8CyIagwWEnFXxy1TqBHnGTZZ4xg5dgSe + Pzj0Roeef+MPp4NwOhj2xkM/CP37VqgSMmPfJqcB2EjaNZQsJhbZN8S+jWduBheIcXDtUm83xlBD + u+Lf7GdFnURgZzPxAt9reyci51oWcWVg47+ajATxGJOFaccUaJmThr8l7J1+tPhYEGRnMPCChpBm + GF6UCZmK10QyyoiFvRPAkn83OrCsHVRMBKZNoCwP2OwBFoALDRxLWg232VdsmgKKUtXkv5SEWlT6 + brf0/4O4kvyDBIMonPjhfTkbWwPlb4sW7MwhTJFyLOrXm8rEfmdPlal9shihlOGjG4P/fspWTB/5 + 3r6gVBF9VHcUcrLpLhnYlFgtxY8K5XIwRdTLBpa5GEnVbJhJsmYit8u5YQjUwqwy61eyCFImPxoM + A7hb6y/ehvIF6WGmslybiW8a/+z632N4299pq/RKTftFaTWt8qu122qwqkDWNV6K1L1aNcdaoVr6 + TjA3au/4VDpb4d72LxntgTEXBwAA headers: content-encoding: [gzip] - content-length: ['761'] + content-length: ['762'] content-type: [application/json] status: {code: 200, message: OK} - request: @@ -260,14 +260,14 @@ interactions: H4sIAAAAAAAAA5VU32/TMBB+319R5YEXWJufg1aagK28sKFVrBMChCInvqihjh059lqo+r9zcZyl EdYEL9Xd+bu77+6+5nA2mXgVKOItJge00WOkUeh5s4rILaiakRyat6ysSnUZJi9EUTSgLn3vVQfn sG/hXDNmIxsJxX8UMJURHyY2v+uAEd8GagmPpdDNuI0SijAMBRZVlPLfiCPvY5vjnQ6Ihb6bgbot - 4GvJU2hyKXZtDz8MozfB664VPlJREQRo2TLwYE+qmsE0F5VdC0I4qaB9XOmMlflkCY/DGyv5th2n + 4GvJU2hyKXZtDz9M3oT+664VPlJREQRo2TLwYE+qmsE0F5VdC0I4qaB9XOmMlflkCY/DGyv5th2n b4ZwseMg01w3SlQg28Trh2D3UHy9XWa327vVDQ0+w+/N1T7zDE87hDmZc+Oz9Yf79fmnVbBb/9ov 33+8uSZfVj+v7uM7VsZ04JJLIApoSszVQz+Iz/3kPIzXfrQILxbhfDqfR3EUfxtSGl3XQqoUcAks JZRKaNpxPPvwzrkQXdPnGkX+NAoiPwkcjeqN4JByXWXdal4GF4mfJEkQRvFAq5aC6lyVgiOXgrAG nu7VS9wc3uxMc5SxYjh4AdCSt2prL0/bWZ5fnylzxN8fRkrjg46UNaWQlcqsZ2ZNq9hT/U1R4yAb JG2Ag+fC0rKptTKssWbvuJC9njro4DmxEmhPFEVhbCeOSGrrGcuFEZLiNIafNV2oHPPTjWAn5azr QuNnRXML7W0X7u9/0uxp8NlhtPQx9OgcRUnCG2Jk1Q00CrgIZIRvU5LnQnN793HElZMTxjKSm6+C - Nxs8FxaV0he2ZvtJOzv+AW6kmdzNBQAA + Nxs8FxaV0he2ZvtJOzv+AfVvz5DNBQAA headers: content-encoding: [gzip] content-length: ['594'] @@ -277,152 +277,152 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd response: body: string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIkp028NXtJbcU6aEtCmFNshURiXT4CGIY+vcubUmmSaXs - RYfdmSF3dsTjTZblxGojO6Z0vsl+YiHLjqcvtgR0DKvCtu2HsdZy8eygIwhhWlpFQiDWKdOGCzBc - ikFlEOknNbunYBitwSAir5blerH8tFiWT2W5WVWbqrpd35X398sf+UQhiiUoq2p993HlUajc1Z0U - pgmH4dQdu/1Wfd3yPw/bl8fP9PvjF/LUvK4e3tTlzH0jRThg3ij229GLycEirYRGkwaEqbUBY52R - uZCLDgxpLsd1zEBgMXtx0DKPHHSzHRiocDSgVDEdbIpwcwiAuCdcKavmy2VcdhcPvUCRvcRGWxNJ - Z5pEWmHUwe9Gg+ysxntoXc+lTmtRt6DNOhyTdcDbqMivAtfjWb9cftykXngv0b+dIpwX6Nopz7o4 - Tosd+v2wIo9IQNG6kS09rdKLgkfmtC883DnJnsYOxHMN5GRSQuYaGilRtuMpiQEzw/X/1nd88H7p - GTPYm2FKYAr+b5gYHl3K2Zaw5AyJmJTrvTUsQZ5QEd8oEBqIe7wSGlfISAcfCStSM4ygGfYrvszQ - Jq6g2AiLFKSi57f9H+EcMBEXn1qazNMIwv+rv+n/AoxtLhJTBgAA + H4sIAAAAAAAAA41Uy27bMBC85ysEnWvLipQ29i1oby2CAG3RokUh0CQLEZFIhY+ggqF/79KWZJpU + wlx02J0ZcmdHPFwlSYqN0qKlUqW75DcUkuRw/EKLo5ZClZumeTfVGsYfLXQCAUwJI7EPhDqhSjOO + NBN8VBlFhlnNdARpSiqkAZFeb/Jytfmw2uTf8ptdWezKcp0Xxfvb7a90pmBJX6UU622+uSlKh0LE + vmoF17U/DCP22I/fi88/Sf98//UT7b88FN3dD7mtn8j5zK4W3B8wrSX9a+nZ7GAWVwKjcY24rpRG + 2lgjUy5WLdK4Ph/XUo08i+mTheZp4KCdradI+qMhQiRV3qYw070HhD3BSun1cjkPy/bivhcg0glo + NBUWZKGJheFa9m43GGRvFNxDqWopdUrxqkFKl/6YtEWsCYrsInADnPXH5sdO6oT3HP31HOE0A9eO + eVbZYV7s2B/GFTlEjCSpatGQ4yqdKDhkRobMwZ2S7GjsEX+sED6aFJG5hAZKhO5ZTGLELHDdv/UF + H5xfesEM+k9TySEFbxsmhAeXsrZFLDlBAiZhqjOaRsgzKuBribhC2D5eEY0LZKADj4ThsRkm0AL7 + GV5m1ESuIOkECxSEJKe3/ZVwjpiAC08tieZpAsH/NVwN/wHQiK4AUwYAAA== headers: content-encoding: [gzip] - content-length: ['495'] + content-length: ['499'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/cards?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?is_valid=True&limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA61VWU/jMBB+51dYeeAJ2sQpvSS0KgWxAlHulZbVKnJ9tBapXWyn2wr1v6/tJE3C - od0H/BApc3hmvvlm/LoHQICRIjoYgl/2B4BX/7XilItnJy4FzjLTRi6ostJg/Ajvxnx2MX65PSU/ - b8/ww3wVX6xVUPhvD8qLGBczqpaKC+Mc+7jHwg6M4+4RYv0+jmncxSyEvU6XYtTtMIJZ3CUEQxqx - eGDNKR6wmDESHiHY7QW7i/FqlSiqs9TdK7I03WlEtpjmaa5rJ7Kn8kYrnSylNihNFsjguctNyEpP - 10uukOFSJAspjNNH4S7CghrUBEfRmbX10EjBMu1+SnOHHTebxMg/3qKuQITYInQCneJErgF8DyEn - /t4xvD+/OZ3cnDyG8vpyiqgemJdxrSaMDJ1JtXHW0swtBLuEzWZJnRgrSrhpgljW38BwisRzItDC - e13cXF3fnY8mYPx9dH8GTkaTywMwaY1aTTy1UZSaCs8N1ZXBVCHh6/jBNarE2ZLYrEmCPDtgG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fJqcB2EjaNZQsJhbZN8S+jWduBheIcXDtUm83xlBD + u+Lf7GdFnURgZzPxAt9reyci51oWcWVg47+ajATxGJOFaccUaJmThr8l7J1+tPhYEGRnMPCChpBm + GF6UCZmK10QyyoiFvRPAkn83OrCsHVRMBKZNoCwP2OwBFoALDRxLWg232VdsmgKKUtXkv5SEWlT6 + brf0/4O4kvyDBIMonPjhfTkbWwPlb4sW7MwhTJFyLOrXm8rEfmdPlal9shihlOGjG4P/fspWTB/5 + 3r6gVBF9VHcUcrLpLhnYlFgtxY8K5XIwRdTLBpa5GEnVbJhJsmYit8u5YQjUwqwy61eyCFImPxoM + A7hb6y/ehvIF6WGmslybiW8a/+z632N4299pq/RKTftFaTWt8qu122qwqkDWNV6K1L1aNcdaoVr6 + TjA3au/4VDpb4d72LxntgTEXBwAA headers: content-encoding: [gzip] - content-length: ['761'] + content-length: ['762'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/cards?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?is_valid=True&limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA61VWU/jMBB+51dYeeAJ2sQpvSS0KgWxAlHulZbVKnJ9tBapXWyn2wr1v6/tJE3C - od0H/BApc3hmvvlm/LoHQICRIjoYgl/2B4BX/7XilItnJy4FzjLTRi6ostJg/Ajvxnx2MX65PSU/ - b8/ww3wVX6xVUPhvD8qLGBczqpaKC+Mc+7jHwg6M4+4RYv0+jmncxSyEvU6XYtTtMIJZ3CUEQxqx - eGDNKR6wmDESHiHY7QW7i/FqlSiqs9TdK7I03WlEtpjmaa5rJ7Kn8kYrnSylNihNFsjguctNyEpP - 10uukOFSJAspjNNH4S7CghrUBEfRmbX10EjBMu1+SnOHHTebxMg/3qKuQITYInQCneJErgF8DyEn - /t4xvD+/OZ3cnDyG8vpy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WNffwXCB+GPM + 0cp5fbu6uPz+dTYHJ6ez6y/geDY/OwDz3qzXxVNpSYhu8CyIagwWEnFXxy1TqBHnGTZZ4xg5dgSe + Pzj0Roeef+MPp4NwOhj2xkM/CP37VqgSMmPfJqcB2EjaNZQsJhbZN8S+jWduBheIcXDtUm83xlBD + u+Lf7GdFnURgZzPxAt9reyci51oWcWVg47+ajATxGJOFaccUaJmThr8l7J1+tPhYEGRnMPCChpBm + GF6UCZmK10QyyoiFvRPAkn83OrCsHVRMBKZNoCwP2OwBFoALDRxLWg232VdsmgKKUtXkv5SEWlT6 + brf0/4O4kvyDBIMonPjhfTkbWwPlb4sW7MwhTJFyLOrXm8rEfmdPlal9shihlOGjG4P/fspWTB/5 + 3r6gVBF9VHcUcrLpLhnYlFgtxY8K5XIwRdTLBpa5GEnVbJhJsmYit8u5YQjUwqwy61eyCFImPxoM + A7hb6y/ehvIF6WGmslybiW8a/+z632N4299pq/RKTftFaTWt8qu122qwqkDWNV6K1L1aNcdaoVr6 + TjA3au/4VDpb4d72LxntgTEXBwAA headers: content-encoding: [gzip] - content-length: ['761'] + content-length: ['762'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd response: body: string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIkp028NXtJbcU6aEtCmFNshURiXT4CGIY+vcubUmmSaXs - RYfdmSF3dsTjTZblxGojO6Z0vsl+YiHLjqcvtgR0DKvCtu2HsdZy8eygIwhhWlpFQiDWKdOGCzBc - ikFlEOknNbunYBitwSAir5blerH8tFiWT2W5WVWbqrpd35X398sf+UQhiiUoq2p993HlUajc1Z0U - pgmH4dQdu/1Wfd3yPw/bl8fP9PvjF/LUvK4e3tTlzH0jRThg3ij229GLycEirYRGkwaEqbUBY52R - uZCLDgxpLsd1zEBgMXtx0DKPHHSzHRiocDSgVDEdbIpwcwiAuCdcKavmy2VcdhcPvUCRvcRGWxNJ - Z5pEWmHUwe9Gg+ysxntoXc+lTmtRt6DNOhyTdcDbqMivAtfjWb9cftykXngv0b+dIpwX6Nopz7o4 - Tosd+v2wIo9IQNG6kS09rdKLgkfmtC883DnJnsYOxHMN5GRSQuYaGilRtuMpiQEzw/X/1nd88H7p - GTPYm2FKYAr+b5gYHl3K2Zaw5AyJmJTrvTUsQZ5QEd8oEBqIe7wSGlfISAcfCStSM4ygGfYrvszQ - Jq6g2AiLFKSi57f9H+EcMBEXn1qazNMIwv+rv+n/AoxtLhJTBgAA + H4sIAAAAAAAAA41Uy27bMBC85ysEnWvLipQ29i1oby2CAG3RokUh0CQLEZFIhY+ggqF/79KWZJpU + wlx02J0ZcmdHPFwlSYqN0qKlUqW75DcUkuRw/EKLo5ZClZumeTfVGsYfLXQCAUwJI7EPhDqhSjOO + NBN8VBlFhlnNdARpSiqkAZFeb/Jytfmw2uTf8ptdWezKcp0Xxfvb7a90pmBJX6UU622+uSlKh0LE + vmoF17U/DCP22I/fi88/Sf98//UT7b88FN3dD7mtn8j5zK4W3B8wrSX9a+nZ7GAWVwKjcY24rpRG + 2lgjUy5WLdK4Ph/XUo08i+mTheZp4KCdradI+qMhQiRV3qYw070HhD3BSun1cjkPy/bivhcg0glo + NBUWZKGJheFa9m43GGRvFNxDqWopdUrxqkFKl/6YtEWsCYrsInADnPXH5sdO6oT3HP31HOE0A9eO + eVbZYV7s2B/GFTlEjCSpatGQ4yqdKDhkRobMwZ2S7GjsEX+sED6aFJG5hAZKhO5ZTGLELHDdv/UF + H5xfesEM+k9TySEFbxsmhAeXsrZFLDlBAiZhqjOaRsgzKuBribhC2D5eEY0LZKADj4ThsRkm0AL7 + GV5m1ESuIOkECxSEJKe3/ZVwjpiAC08tieZpAsH/NVwN/wHQiK4AUwYAAA== headers: content-encoding: [gzip] - content-length: ['495'] + content-length: ['499'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/cards?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?is_valid=True&limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA61VWU/jMBB+51dYeeAJ2sQpvSS0KgWxAlHulZbVKnJ9tBapXWyn2wr1v6/tJE3C - od0H/BApc3hmvvlm/LoHQICRIjoYgl/2B4BX/7XilItnJy4FzjLTRi6ostJg/Ajvxnx2MX65PSU/ - b8/ww3wVX6xVUPhvD8qLGBczqpaKC+Mc+7jHwg6M4+4RYv0+jmncxSyEvU6XYtTtMIJZ3CUEQxqx - eGDNKR6wmDESHiHY7QW7i/FqlSiqs9TdK7I03WlEtpjmaa5rJ7Kn8kYrnSylNihNFsjguctNyEpP - 10uukOFSJAspjNNH4S7CghrUBEfRmbX10EjBMu1+SnOHHTebxMg/3qKuQITYInQCneJErgF8DyEn - /t4xvD+/OZ3cnDyG8vpyiqgemJdxrSaMDJ1JtXHW0swtBLuEzWZJnRgrSrhpgljW38BwisRzItDC - e13cXF3fnY8mYPx9dH8GTkaTywMwaY1aTTy1UZSaCs8N1ZXBVCHh6/jBNarE2ZLYrEmCPDtgGHUO - w95hGD1E0TCGQxi3+v0+7AyeaqFyyKx9nZwWYCup15CzmDpkPxBHLl4EY3CFuAD3PvV6Yyw1jC/+ - w34W1MGSeJtBCKOw7o1lJozaJIWBi/9uMjASCaFT244hMCqjFX9z2Bv9qPFxQ5GbQRjCipB2GN6U - GXCdrKjijFMHeyOAI/9udIK8dlAwEdg2gbw84LIHRAIhDfAsqTXcZV+waQgYSnWV/1xR5lBp+93S - /g/iKvoPEsB+pxP3nvLZ2Foofzu0gsYcBinSnkXtclPZ2J/sqTy1bw4jlHJy/GDx30/5gpvjKNyX - jGlqjsuOBoKum0smqEosluJXhfI52CLKZRPkuVhJ0exgqeiKy8wt54ohgZF2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N4299pq/RKTftFaTWt8qu122qwqkDWNV6K1L1aNcdaoVr6 + TjA3au/4VDpb4d72LxntgTEXBwAA headers: content-encoding: [gzip] - content-length: ['761'] + content-length: ['762'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/cards?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?is_valid=True&limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA61VWU/jMBB+51dYeeAJ2sQpvSS0KgWxAlHulZbVKnJ9tBapXWyn2wr1v6/tJE3C - od0H/BApc3hmvvlm/LoHQICRIjoYgl/2B4BX/7XilItnJy4FzjLTRi6ostJg/Ajvxnx2MX65PSU/ - b8/ww3wVX6xVUPhvD8qLGBczqpaKC+Mc+7jHwg6M4+4RYv0+jmncxSyEvU6XYtTtMIJZ3CUEQxqx - eGDNKR6wmDESHiHY7QW7i/FqlSiqs9TdK7I03WlEtpjmaa5rJ7Kn8kYrnSylNihNFsjguctNyEpP - 10uukOFSJAspjNNH4S7CghrUBEfRmbX10EjBMu1+SnOHHTebxMg/3qKuQITYInQCneJErgF8DyEn - /t4xvD+/OZ3cnDyG8vpyiqgemJdxrSaMDJ1JtXHW0swtBLuEzWZJnRgrSrhpgljW38BwisRzItDC - e13cXF3fnY8mYPx9dH8GTkaTywMwaY1aTTy1UZSaCs8N1ZXBVCHh6/jBNarE2ZLYrEmCPDtgGHUO - w95hGD1E0TCGQxi3+v0+7AyeaqFyyKx9nZwWYCup15CzmDpkPxBHLl4EY3CFuAD3PvV6Yyw1jC/+ - w34W1MGSeJtBCKOw7o1lJozaJIWBi/9uMjASCaFT244hMCqjFX9z2Bv9qPFxQ5GbQRjCipB2GN6U - GXCdrKjijFMHeyOAI/9udIK8dlAwEdg2gbw84LIHRAIhDfAsqTXcZV+waQgYSnWV/1xR5lBp+93S - /g/iK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Plal9shihlOGjG4P/fspWTB/5 + 3r6gVBF9VHcUcrLpLhnYlFgtxY8K5XIwRdTLBpa5GEnVbJhJsmYit8u5YQjUwqwy61eyCFImPxoM + A7hb6y/ehvIF6WGmslybiW8a/+z632N4299pq/RKTftFaTWt8qu122qwqkDWNV6K1L1aNcdaoVr6 + TjA3au/4VDpb4d72LxntgTEXBwAA headers: content-encoding: [gzip] - content-length: ['761'] + content-length: ['762'] content-type: [application/json] status: {code: 200, message: OK} - request: @@ -436,14 +436,14 @@ interactions: H4sIAAAAAAAAA5VU32/TMBB+319R5YEXWJufg1aagK28sKFVrBMChCInvqihjh059lqo+r9zcZyl EdYEL9Xd+bu77+6+5nA2mXgVKOItJge00WOkUeh5s4rILaiakRyat6ysSnUZJi9EUTSgLn3vVQfn sG/hXDNmIxsJxX8UMJURHyY2v+uAEd8GagmPpdDNuI0SijAMBRZVlPLfiCPvY5vjnQ6Ihb6bgbot - 4GvJU2hyKXZtDz8MozfB664VPlJREQRo2TLwYE+qmsE0F5VdC0I4qaB9XOmMlflkCY/DGyv5th2n + 4GvJU2hyKXZtDz9M3oT+664VPlJREQRo2TLwYE+qmsE0F5VdC0I4qaB9XOmMlflkCY/DGyv5th2n b4ZwseMg01w3SlQg28Trh2D3UHy9XWa327vVDQ0+w+/N1T7zDE87hDmZc+Oz9Yf79fmnVbBb/9ov 33+8uSZfVj+v7uM7VsZ04JJLIApoSszVQz+Iz/3kPIzXfrQILxbhfDqfR3EUfxtSGl3XQqoUcAks JZRKaNpxPPvwzrkQXdPnGkX+NAoiPwkcjeqN4JByXWXdal4GF4mfJEkQRvFAq5aC6lyVgiOXgrAG nu7VS9wc3uxMc5SxYjh4AdCSt2prL0/bWZ5fnylzxN8fRkrjg46UNaWQlcqsZ2ZNq9hT/U1R4yAb JG2Ag+fC0rKptTKssWbvuJC9njro4DmxEmhPFEVhbCeOSGrrGcuFEZLiNIafNV2oHPPTjWAn5azr QuNnRXML7W0X7u9/0uxp8NlhtPQx9OgcRUnCG2Jk1Q00CrgIZIRvU5LnQnN793HElZMTxjKSm6+C - Nxs8FxaV0he2ZvtJOzv+AW6kmdzNBQAA + Nxs8FxaV0he2ZvtJOzv+AfVvz5DNBQAA headers: content-encoding: [gzip] content-length: ['594'] @@ -453,76 +453,76 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd response: body: string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIkp028NXtJbcU6aEtCmFNshURiXT4CGIY+vcubUmmSaXs - RYfdmSF3dsTjTZblxGojO6Z0vsl+YiHLjqcvtgR0DKvCtu2HsdZy8eygIwhhWlpFQiDWKdOGCzBc - ikFlEOknNbunYBitwSAir5blerH8tFiWT2W5WVWbqrpd35X398sf+UQhiiUoq2p993HlUajc1Z0U - pgmH4dQdu/1Wfd3yPw/bl8fP9PvjF/LUvK4e3tTlzH0jRThg3ij229GLycEirYRGkwaEqbUBY52R - uZCLDgxpLsd1zEBgMXtx0DKPHHSzHRiocDSgVDEdbIpwcwiAuCdcKavmy2VcdhcPvUCRvcRGWxNJ - Z5pEWmHUwe9Gg+ysxntoXc+lTmtRt6DNOhyTdcDbqMivAtfjWb9cftykXngv0b+dIpwX6Nopz7o4 - Tosd+v2wIo9IQNG6kS09rdKLgkfmtC883DnJnsYOxHMN5GRSQuYaGilRtuMpiQEzw/X/1nd88H7p - GTPYm2FKYAr+b5gYHl3K2Zaw5AyJmJTrvTUsQZ5QEd8oEBqIe7wSGlfISAcfCStSM4ygGfYrvszQ - Jq6g2AiLFKSi57f9H+EcMBEXn1qazNMIwv+rv+n/AoxtLhJTBgAA + H4sIAAAAAAAAA41Uy27bMBC85ysEnWvLipQ29i1oby2CAG3RokUh0CQLEZFIhY+ggqF/79KWZJpU + wlx02J0ZcmdHPFwlSYqN0qKlUqW75DcUkuRw/EKLo5ZClZumeTfVGsYfLXQCAUwJI7EPhDqhSjOO + NBN8VBlFhlnNdARpSiqkAZFeb/Jytfmw2uTf8ptdWezKcp0Xxfvb7a90pmBJX6UU622+uSlKh0LE + vmoF17U/DCP22I/fi88/Sf98//UT7b88FN3dD7mtn8j5zK4W3B8wrSX9a+nZ7GAWVwKjcY24rpRG + 2lgjUy5WLdK4Ph/XUo08i+mTheZp4KCdradI+qMhQiRV3qYw070HhD3BSun1cjkPy/bivhcg0glo + NBUWZKGJheFa9m43GGRvFNxDqWopdUrxqkFKl/6YtEWsCYrsInADnPXH5sdO6oT3HP31HOE0A9eO + eVbZYV7s2B/GFTlEjCSpatGQ4yqdKDhkRobMwZ2S7GjsEX+sED6aFJG5hAZKhO5ZTGLELHDdv/UF + H5xfesEM+k9TySEFbxsmhAeXsrZFLDlBAiZhqjOaRsgzKuBribhC2D5eEY0LZKADj4ThsRkm0AL7 + GV5m1ESuIOkECxSEJKe3/ZVwjpiAC08tieZpAsH/NVwN/wHQiK4AUwYAAA== headers: content-encoding: [gzip] - content-length: ['495'] + content-length: ['499'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/cards?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?is_valid=True&limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA61VWU/jMBB+51dYeeAJ2sQpvSS0KgWxAlHulZbVKnJ9tBapXWyn2wr1v6/tJE3C - od0H/BApc3hmvvlm/LoHQICRIjoYgl/2B4BX/7XilItnJy4FzjLTRi6ostJg/Ajvxnx2MX65PSU/ - b8/ww3wVX6xVUPhvD8qLGBczqpaKC+Mc+7jHwg6M4+4RYv0+jmncxSyEvU6XYtTtMIJZ3CUEQxqx - eGDNKR6wmDESHiHY7QW7i/FqlSiqs9TdK7I03WlEtpjmaa5rJ7Kn8kYrnSylNihNFsjguctNy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xXcRaPDmLtgJhbIpQcWAVx2IDgtcQ + MuzuPQkvTo/VXbQ+Reehys9v8c3t4nLSQgRp8iBkYa2FXhoIdgnrIiNWnEiCme6CWNffwXCB+GPM + 0cp5fbu6uPz+dTYHJ6ez6y/geDY/OwDz3qzXxVNpSYhu8CyIagwWEnFXxy1TqBHnGTZZ4xg5dgSe + Pzj0Roeef+MPp4NwOhj2xkM/CP37VqgSMmPfJqcB2EjaNZQsJhbZN8S+jWduBheIcXDtUm83xlBD + u+Lf7GdFnURgZzPxAt9reyci51oWcWVg47+ajATxGJOFaccUaJmThr8l7J1+tPhYEGRnMPCChpBm + GF6UCZmK10QyyoiFvRPAkn83OrCsHVRMBKZNoCwP2OwBFoALDRxLWg232VdsmgKKUtXkv5SEWlT6 + brf0/4O4kvyDBIMonPjhfTkbWwPlb4sW7MwhTJFyLOrXm8rEfmdPlal9shihlOGjG4P/fspWTB/5 + 3r6gVBF9VHcUcrLpLhnYlFgtxY8K5XIwRdTLBpa5GEnVbJhJsmYit8u5YQjUwqwy61eyCFImPxoM + A7hb6y/ehvIF6WGmslybiW8a/+z632N4299pq/RKTftFaTWt8qu122qwqkDWNV6K1L1aNcdaoVr6 + TjA3au/4VDpb4d72LxntgTEXBwAA headers: content-encoding: [gzip] - content-length: ['761'] + content-length: ['762'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/cards?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?is_valid=True&limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA61VWU/jMBB+51dYeeAJ2sQpvSS0KgWxAlHulZbVKnJ9tBapXWyn2wr1v6/tJE3C - od0H/BApc3hmvvlm/LoHQICRIjoYgl/2B4BX/7XilItnJy4FzjLTRi6ostJg/Ajvxnx2MX65PSU/ - b8/ww3wVX6xVUPhvD8qLGB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sMI4yQg + Pg0nxpwkExpSir0hCqIR3F2crNexJCpP7b08T9OdhuerRZnmpnV8cxpvtFZxJpRGabxCOlna3Lho + 9GSTMYk0EzxeCa6t3vd2EVZEoy44kjwYWweN4DRX9qc2t9gxXcRaPDmLtgJhbIpQcWAVx2IDgtcQ + MuzuPQkvTo/VXbQ+Reehys9v8c3t4nLSQgRp8iBkYa2FXhoIdgnrIiNWnEiCme6CWNffwXCB+GPM + 0cp5fbu6uPz+dTYHJ6ez6y/geDY/OwDz3qzXxVNpSYhu8CyIagwWEnFXxy1TqBHnGTZZ4xg5dgSe + Pzj0Roeef+MPp4NwOhj2xkM/CP37VqgSMmPfJqcB2EjaNZQsJhbZN8S+jWduBheIcXDtUm83xlBD + u+Lf7GdFnURgZzPxAt9reyci51oWcWVg47+ajATxGJOFaccUaJmThr8l7J1+tPhYEGRnMPCChpBm + GF6UCZmK10QyyoiFvRPAkn83OrCsHVRMBKZNoCwP2OwBFoALDRxLWg232VdsmgKKUtXkv5SEWlT6 + brf0/4O4kvyDBIMonPjhfTkbWwPlb4sW7MwhTJFyLOrXm8rEfmdPlal9shihlOGjG4P/fspWTB/5 + 3r6gVBF9VHcUcrLpLhnYlFgtxY8K5XIwRdTLBpa5GEnVbJhJsmYit8u5YQjUwqwy61eyCFImPxoM + A7hb6y/ehvIF6WGmslybiW8a/+z632N4299pq/RKTftFaTWt8qu122qwqkDWNV6K1L1aNcdaoVr6 + TjA3au/4VDpb4d72LxntgTEXBwAA headers: content-encoding: [gzip] - content-length: ['761'] + content-length: ['762'] content-type: [application/json] status: {code: 200, message: OK} - request: @@ -536,14 +536,14 @@ interactions: H4sIAAAAAAAAA5VU32/TMBB+319R5YEXWJufg1aagK28sKFVrBMChCInvqihjh059lqo+r9zcZyl EdYEL9Xd+bu77+6+5nA2mXgVKOItJge00WOkUeh5s4rILaiakRyat6ysSnUZJi9EUTSgLn3vVQfn sG/hXDNmIxsJxX8UMJURHyY2v+uAEd8GagmPpdDNuI0SijAMBRZVlPLfiCPvY5vjnQ6Ihb6bgbot - 4GvJU2hyKXZtDz8MozfB664VPlJREQRo2TLwYE+qmsE0F5VdC0I4qaB9XOmMlflkCY/DGyv5th2n + 4GvJU2hyKXZtDz9M3oT+664VPlJREQRo2TLwYE+qmsE0F5VdC0I4qaB9XOmMlflkCY/DGyv5th2n b4ZwseMg01w3SlQg28Trh2D3UHy9XWa327vVDQ0+w+/N1T7zDE87hDmZc+Oz9Yf79fmnVbBb/9ov 33+8uSZfVj+v7uM7VsZ04JJLIApoSszVQz+Iz/3kPIzXfrQILxbhfDqfR3EUfxtSGl3XQqoUcAks JZRKaNpxPPvwzrkQXdPnGkX+NAoiPwkcjeqN4JByXWXdal4GF4mfJEkQRvFAq5aC6lyVgiOXgrAG nu7VS9wc3uxMc5SxYjh4AdCSt2prL0/bWZ5fnylzxN8fRkrjg46UNaWQlcqsZ2ZNq9hT/U1R4yAb JG2Ag+fC0rKptTKssWbvuJC9njro4DmxEmhPFEVhbCeOSGrrGcuFEZLiNIafNV2oHPPTjWAn5azr QuNnRXML7W0X7u9/0uxp8NlhtPQx9OgcRUnCG2Jk1Q00CrgIZIRvU5LnQnN793HElZMTxjKSm6+C - Nxs8FxaV0he2ZvtJOzv+AW6kmdzNBQAA + Nxs8FxaV0he2ZvtJOzv+AfVvz5DNBQAA headers: content-encoding: [gzip] content-length: ['594'] @@ -557,9 +557,9 @@ interactions: response: body: {string: !!python/unicode "{\n \"customers\": [\n {\n \"name\": null,\n \"links\": {\n \"source\": null,\n \"destination\": - null\n },\n \"updated_at\": \"2014-07-22T17:51:58.314446Z\",\n \"created_at\": - \"2014-07-22T17:51:58.205134Z\",\n \"dob_month\": null,\n \"id\": - \"CU6PdAsVriTtB542L7QxJOxn\",\n \"phone\": null,\n \"href\": \"/customers/CU6PdAsVriTtB542L7QxJOxn\",\n + null\n },\n \"updated_at\": \"2014-07-29T09:59:11.504432Z\",\n \"created_at\": + \"2014-07-29T09:59:11.373873Z\",\n \"dob_month\": null,\n \"id\": + \"CU7HQxjNsUWm6TTgylayybfX\",\n \"phone\": null,\n \"href\": \"/customers/CU7HQxjNsUWm6TTgylayybfX\",\n \ \"merchant_status\": \"no-match\",\n \"meta\": {\n \"seq\": \"3\"\n },\n \"dob_year\": null,\n \"address\": {\n \"city\": null,\n \"line2\": null,\n \"line1\": null,\n \"state\": @@ -591,16 +591,16 @@ interactions: \ \"customer\": null\n },\n \"fingerprint\": \"1e2c425a579a1c7f27a037f0662b855035ceadbff18a0adbe785fb07e2afe1cc\",\n \ \"cvv_result\": null,\n \"number\": \"xxxxxxxxxxxx4242\",\n \"avs_postal_match\": null,\n \"expiration_month\": 12,\n \"meta\": {},\n \"id\": - \"CC6Q9AMkJyop1mQoIoOLoUb6\",\n \"category\": \"other\",\n \"type\": + \"CC7J72dswEquYGPf9vnEqJYQ\",\n \"category\": \"other\",\n \"type\": \"credit\",\n \"cvv_match\": null,\n \"bank_name\": \"\",\n \"avs_street_match\": - null,\n \"brand\": \"Visa\",\n \"updated_at\": \"2014-07-22T17:51:59.036048Z\",\n + null,\n \"brand\": \"Visa\",\n \"updated_at\": \"2014-07-29T09:59:12.505259Z\",\n \ \"address\": {\n \"city\": null,\n \"line2\": null,\n \ \"line1\": null,\n \"state\": null,\n \"postal_code\": null,\n \"country_code\": null\n },\n \"can_debit\": true,\n \ \"name\": null,\n \"expiration_year\": 2020,\n \"cvv\": null,\n \ \"is_verified\": true,\n \"avs_result\": null,\n \"can_credit\": - false,\n \"href\": \"/cards/CC6Q9AMkJyop1mQoIoOLoUb6\",\n \"created_at\": - \"2014-07-22T17:51:59.036045Z\"\n }\n ],\n \"links\": {\n \"cards.card_holds\": + false,\n \"href\": \"/cards/CC7J72dswEquYGPf9vnEqJYQ\",\n \"created_at\": + \"2014-07-29T09:59:12.505257Z\"\n }\n ],\n \"links\": {\n \"cards.card_holds\": \"/cards/{cards.id}/card_holds\",\n \"cards.customer\": \"/customers/{cards.customer}\",\n \ \"cards.disputes\": \"/cards/{cards.id}/disputes\",\n \"cards.debits\": \"/cards/{cards.id}/debits\"\n }\n}"} @@ -612,106 +612,106 @@ interactions: content-type: [application/json] status: {code: 201, message: CREATED} - request: - body: '{"links": {"customer": "/customers/CU6PdAsVriTtB542L7QxJOxn"}, "cvv_result": + body: '{"links": {"customer": "/customers/CU7HQxjNsUWm6TTgylayybfX"}, "cvv_result": null, "number": "xxxxxxxxxxxx4242", "expiration_month": 12, "meta": {}, "id": - "CC6Q9AMkJyop1mQoIoOLoUb6", "category": "other", "is_verified": true, "type": + "CC7J72dswEquYGPf9vnEqJYQ", "category": "other", "is_verified": true, "type": "credit", "cvv_match": null, "bank_name": "", "avs_street_match": null, "brand": - "Visa", "updated_at": "2014-07-22T17:51:59.036048Z", "fingerprint": "1e2c425a579a1c7f27a037f0662b855035ceadbff18a0adbe785fb07e2afe1cc", + "Visa", "updated_at": "2014-07-29T09:59:12.505259Z", "fingerprint": "1e2c425a579a1c7f27a037f0662b855035ceadbff18a0adbe785fb07e2afe1cc", "can_debit": true, "name": null, "expiration_year": 2020, "can_credit": false, - "avs_postal_match": null, "avs_result": null, "cvv": null, "created_at": "2014-07-22T17:51:59.036045Z", + "avs_postal_match": null, "avs_result": null, "cvv": null, "created_at": "2014-07-29T09:59:12.505257Z", "address": {"city": null, "line2": null, "line1": null, "state": null, "postal_code": null, "country_code": null}}' headers: {} method: PUT - uri: https://api.balancedpayments.com:443/cards/CC6Q9AMkJyop1mQoIoOLoUb6 + uri: https://api.balancedpayments.com:443/cards/CC7J72dswEquYGPf9vnEqJYQ response: body: string: !!binary | - H4sIAAAAAAAAA41UTW+jMBC991cgzm1iHD6S3NqetuqqG6ntoasVMvbQWAEb2SZKFPHf1+YjIWmq - XQ4IZvxm3sw8z+HG83xKFNP+0vttfzzv0L6tueBi48yDwZ2stZElKGv1H9/iX+xevyv+ah6iED8n - q93Ty074Pb65HQLlXHyCqhQXxgEDwDTEEYmSBQlokuOEoFmSozjG2TyK0CyiQFiW58GcIPsByTzK - M5Q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4ALffkwbOb5fd6jj1ki89TjJ9ZLVRwG0hf9oe0ul/ + uEvBPzSMgsiK+Nyd08Yu6Lcb6Oy4d5fCxHVNNkXW3g8DiX3LZSJY07Lq891WBtzoopgOt4ae9sgh + 0PQ+6kFM6LIy8EGrQ/akUSvlR4guZ4drrpo3WxdHCuoEAAA= headers: content-encoding: [gzip] - content-length: ['546'] + content-length: ['548'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU6PdAsVriTtB542L7QxJOxn + uri: https://api.balancedpayments.com:443/customers/CU7HQxjNsUWm6TTgylayybfX response: body: string: !!binary | - H4sIAAAAAAAAA41UTY+bMBC9769AnDdLIGRT5dbtrarUVtr20KpCE9sV1oKd+qNKFPHfO06AOJiu - 98Jh5r1nz5uHT3dJkhKrjWyZ0uk2+YmFJDmdv9gS0DKsCts090Ot4eLFQQcQwrS0ikyBWKdMGy7A - cCl6lV6kG9XsnoJhtAKDiLRY5uViuVkUxXO+2a7z7frdwyovy/LxRzpSiGIRSrFc56vSo1C5q1op - TD0dhlN37Idvj1/oe/1d8WfztC6LT5uvh4+fD+J65r6WYjpgWiv229Gz0cEsroRGkxqEqbQBY52R - qZCLFgypr8e1zMDEYvbHQVdp4KCb7chATUcDShXTk00Rbo4TIO4JV8qK+XIelt3Fp16gyF5io6mI - pDNNIq0w6uh3g0F2VuM9tK7mUqe1qBrQppyOyVrgTVDkN4Hr8KxfLj9uUi+81+g/jBFOM3TtnGed - ncbF9v2uX5FHJKBoVcuGnlfpRcEjc9plHu6SZE9jB+KlAnI2KSJzCw2UKNvxmESPmeH6f+t/fPB+ - 6Rkz2MEwJTAFbxsmhAeXcrZFLLlAAiblem8Ni5BHVMA3CoQG4h6viMYNMtDBR8KK2AwDaIb9F19m - aCJXUGyABQpS0cvb/ko4e0zAxaeWRvM0gPD/6u66f6HHamtTBgAA + H4sIAAAAAAAAA41UwY6bMBC971cgzs2ShGzT5LqXnipVyqpVqwoNtndxF+zUNtWiiH/vOAHi2LTu + hcPMe8+eNw+f7pIkJa02smFKp/vkOxaS5HT+YktAw7Aq2rp+N9ZqLl4tdAQhTMtWER+Idcq04QIM + l2JQGUT6Sa09UjCMFmAQka6Xq81iuV2sd4flbv+w269W9w/LzSZff0snClEsQsm3+Ydt7lCoLItG + ClP5w3Bqj3182n78/Pbzk3760rw/HF66GrqufP56PfNYSeEPmFaKPVt6NjmYxZXQaFKBMIU2YFpr + ZCrkogFDqutxDTPgWcx+WWieBg7a2ToGyh8NKFVMe5si3HQeEPeEK2Xr+fIqLNuL+16gyFFioy6I + pDNNIlthVOd2g0HKVuM9tC7mUqe1KGrQZuOPyRrgdVDkN4Hr8awfNj92Uie81+jfTxFOM3TtnGed + nabFDv1+WJFDJKBoUcmanlfpRMEhc9pnDu6SZEejBPFaADmbFJG5hQZKlJU8JjFgZrju3/oXH5xf + esYM9maYEpiC/xsmhAeXsrZFLLlAAibl+tgaFiFPqIBvFAgNxD5eEY0bZKCDj0QrYjOMoBn2b3yZ + oY5cQbERFihIRS9v+z/COWACLj61NJqnEYT/V3/X/wHgkelOUwYAAA== headers: content-encoding: [gzip] - content-length: ['495'] + content-length: ['496'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU6PdAsVriTtB542L7QxJOxn/cards?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU7HQxjNsUWm6TTgylayybfX/cards?is_valid=True&limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA61UwU7jMBC98xWRD5wW6pikoZXQiuW0iBWLVDiAVpETT6hFYke2U7VC/fe1naRJ - S9HugR6qdsYz82bem3k/CQKUU8U0mgcv9k8QvPtvay65eHPm3uBeNtrICpS1opvH6W92rZ8UX5gf - cUTukof17f1aoC5++61PVHDxCqpWXBgXGALJIxLTOJnRME8KklB8kRR4OiXZZRzjizgHyrKiCC8p - tj8guYyLDCdAaAFhnqNd4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+ s3A6C/DlJMJhFD0NKlFqGDiWCde2uyEjjZ4AnzYHr82GF227OkrSEpYW9IQzLSqhZR0PvK/EmBIR + U0jMdGeelhX0kmmmeCCjgQRqIFb22Mf+UH9HCBFX8RokZxzsfA8KWL2dVqvF1FI+8xjJVI9qJYGZ + RGjklnT0H+qS8A8OQz80JD41e7ozA/plG0KdoN3EUEaUE8GoW3lT+42Fb6B9tJ2TjNP5wkz1POM5 + 1/PAPy8YU6DnfisZJGBzuK2ob7G9Lu9VymEwTQQtY6jBYiydoZSw5kVl5dvzjnRhboKNa4hGjMv3 + HoYZsjscR0e2OcWXlKuy0mBhdcRvHf+XnO5Ge28Lr/EMT/OAtDau8+46GtogkzReFZk7/ydK2Vet + /6CYW6A3Ylqf7fBs9xe46IvaYAYAAA== headers: content-encoding: [gzip] - content-length: ['647'] + content-length: ['649'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU6PdAsVriTtB542L7QxJOxn/cards?is_valid=True&limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU7HQxjNsUWm6TTgylayybfX/cards?is_valid=True&limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA61UwU7jMBC98xWRD5wW6pikoZXQiuW0iBWLVDiAVpETT6hFYke2U7VC/fe1naRJ - S9HugR6qdsYz82bem3k/CQKUU8U0mgcv9k8QvPtvay65eHPm3uBeNtrICpS1opvH6W92rZ8UX5gf - cUTukof17f1aoC5++61PVHDxCqpWXBgXGALJIxLTOJnRME8KklB8kRR4OiXZZRzjizgHyrKiCC8p - tj8guYyLDCdAaAFhnqNd4ny1ShXopnR5RVOWO49oqqyFuR59IhKRIZqudFpLbWiZVtTky8McsK65 - ooZLkVZSGOcPya5CBYa64QxtcubHcjN9mF3/ervdyDqsHuRPeX8nH7PpCDU18CrVxr2WZmlh7pKa - TQ3OnCtg3Ow3ehRjRsVbKmjlo/Zb00YBmOOtZYoKj/aJazqENTWz2FhK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/plG0KdoN3EUEaUE8GoW3lT+42Fb6B9tJ2TjNP5wkz1POM5 + 1/PAPy8YU6DnfisZJGBzuK2ob7G9Lu9VymEwTQQtY6jBYiydoZSw5kVl5dvzjnRhboKNa4hGjMv3 + HoYZsjscR0e2OcWXlKuy0mBhdcRvHf+XnO5Ge28Lr/EMT/OAtDau8+46GtogkzReFZk7/ydK2Vet + /6CYW6A3Ylqf7fBs9xe46IvaYAYAAA== headers: content-encoding: [gzip] - content-length: ['647'] + content-length: ['649'] content-type: [application/json] status: {code: 200, message: OK} version: 1 diff --git a/tests/py/fixtures/TestBillingAssociate.yml b/tests/py/fixtures/TestBillingAssociate.yml index 6cd1fc2d39..66bdc334e6 100644 --- a/tests/py/fixtures/TestBillingAssociate.yml +++ b/tests/py/fixtures/TestBillingAssociate.yml @@ -3,19 +3,19 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF response: body: string: !!binary | - H4sIAAAAAAAAA41UQW7bMBC85xWCznVkyS6a+JqiPeQWtCjgohBWJBMRkUiFpIoahv7epS3JNKmU - veiwOzPkzo54vEmSlPTayJYpne6Sn1hIkuPpiy0BLcOq6Jvmw1RruHi10AmEMC17RXwg1inThgsw - XIpRZRQZZrW+o2AYLcEgIi3W+Xa1/rRa59/yfLcpdkV+e/+x2Nzn+3SmEMUilLvNXVFsHAqVVdlK - YWp/GE7tsQ/fi6ft/g2eHj/v5Y/8a/f8wh6/VOpyZldL4Q+Y1oo9W3o2O5jFldBoUoMwpTZgemtk - KuSqBUPqy3EtM+BZzN4sdJ0GDtrZDgyUPxpQqpj2NkW4OXhA3BOulBXL5Tws24v7XqBIJ7HRlETS - hSaRvTDq4HaDQape4z20LpdSp7UoG9Bm64/JWuBNUORXgRvwrF82P3ZSJ7yX6N/OEU4zdO2UZ50d - 58WO/WFckUMkoGhZy4aeVulEwSFzOmQO7pxkR6MC8VoCOZkUkbmGBkqUVTwmMWIWuO7f+o4Pzi+9 - YAb7Y5gSmIL/GyaEB5eytkUsOUMCJuW66w2LkGdUwDcKhAZiH6+IxhUy0MFHohexGSbQAvs3vszQ - RK6g2AQLFKSi57f9H+EcMQEXn1oazdMEwv9ruBn+AkKZuqpTBgAA + H4sIAAAAAAAAA41UTW/cIBS851dYPnfjZe1spFwTVZVyaFS1h7aqLAxERrFhw0fb1cr/vY9d28uC + EypZPjxmBt68gcNVluXEaiN7pnR+l/2EQpYdjn9YErhnUBW26z5MtY6LFwedQADT0ioSAqFOmTZc + YMOlGFVGkWFWszuKDaM1NoDIN2tUrda3qzX6im7uqhK+65vytkTbH/lMIYolKBXalgh5FCqbupfC + tGEznLpt77+Vj/LxS4M25cPT90/lfqv+VJ/7j+c9d60UYYN5q9izoxezg0VaCYwmLRam1gYb64zM + hVz12JD2vF3PDA4sZq8Ous4jB11ve4ZV2BqmVDEdTIpwsw+AMCcYKdssl1FcdgcPvQCRnYSFriaS + LiwSaYVRe381aqSxGs6hdb2UOq1F3WFtqrBN1mPeRUV+EbgB9vrl8uM69cJ7jv71HOG8ANeOedbF + YR7suD6MI/KIBCtat7Kjx1F6UfDInA6Fhzsl2dNosHipMTmalJC5hEZKlDU8JTFiFrj+bX3DB+9K + L5jB/hqmBKTg/5qJ4dGhnG0JS06QiEm53lnDEuQZFfGNwkJj4h6vhMYFMtKBR8KKVA8TaIH9G15m + 3CWOoNgEixSkoqe3/Z1wjpiIC08tTeZpAsH9Gq6Gf35I1iBTBgAA headers: content-encoding: [gzip] content-length: ['495'] @@ -25,19 +25,19 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF response: body: string: !!binary | - H4sIAAAAAAAAA41UQW7bMBC85xWCznVkyS6a+JqiPeQWtCjgohBWJBMRkUiFpIoahv7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BCtat7Kjx1F6UfDInA6Fhzsl2dNosHipMTmalJC5hEZKlDU8JTFiFrj+bX3DB+9K + L5jB/hqmBKTg/5qJ4dGhnG0JS06QiEm53lnDEuQZFfGNwkJj4h6vhMYFMtKBR8KKVA8TaIH9G15m + 3CWOoNgEixSkoqe3/Z1wjpiIC08tTeZpAsH9Gq6Gf35I1iBTBgAA headers: content-encoding: [gzip] content-length: ['495'] @@ -47,13 +47,13 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0 response: body: {string: !!python/unicode "{\n \"bank_accounts\": [],\n \"meta\": {\n - \ \"last\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0\",\n - \ \"next\": null,\n \"href\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0\",\n + \ \"last\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0\",\n + \ \"next\": null,\n \"href\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0\",\n \ \"limit\": 10,\n \"offset\": 0,\n \"previous\": null,\n \"total\": - 0,\n \"first\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0\"\n + 0,\n \"first\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0\"\n \ },\n \"links\": {}\n}"} headers: content-length: ['396'] @@ -69,8 +69,8 @@ interactions: \"Not Found\",\n \"category_code\": \"not-found\",\n \"description\": \"

The requested URL was not found on the server.

If you entered the URL manually please check your spelling and try again.

Your request id - is OHM698aee0a011311e48ad106429171ffad.\",\n \"status_code\": 404,\n - \ \"category_type\": \"request\",\n \"request_id\": \"OHM698aee0a011311e48ad106429171ffad\"\n + is OHM8c2ebc98013611e4b7da06429171ffad.\",\n \"status_code\": 404,\n + \ \"category_type\": \"request\",\n \"request_id\": \"OHM8c2ebc98013611e4b7da06429171ffad\"\n \ }\n ]\n}"} headers: content-length: ['430'] @@ -87,13 +87,13 @@ interactions: \"321174851\",\n \"bank_name\": \"SAN MATEO CREDIT UNION\",\n \"account_type\": \"checking\",\n \"name\": \"Alice G. Krebs\",\n \"links\": {\n \"customer\": null,\n \"bank_account_verification\": null\n },\n \"can_credit\": - true,\n \"created_at\": \"2014-07-01T11:32:41.951223Z\",\n \"fingerprint\": + true,\n \"created_at\": \"2014-07-01T15:44:12.669501Z\",\n \"fingerprint\": \"5f0ba9fa3f1122ef13b944a40abfe44e7eba9e16934e64200913cb4c402ace14\",\n \"updated_at\": - \"2014-07-01T11:32:41.951226Z\",\n \"href\": \"/bank_accounts/BA3dHpK9BMTGleJbwQyO9U2B\",\n + \"2014-07-01T15:44:12.669504Z\",\n \"href\": \"/bank_accounts/BA4hixLak3IdlPJRaGtMXgB7\",\n \ \"meta\": {},\n \"account_number\": \"xxxxxx0001\",\n \"address\": {\n \"city\": null,\n \"line2\": null,\n \"line1\": null,\n \ \"state\": null,\n \"postal_code\": null,\n \"country_code\": - null\n },\n \"can_debit\": false,\n \"id\": \"BA3dHpK9BMTGleJbwQyO9U2B\"\n + null\n },\n \"can_debit\": false,\n \"id\": \"BA4hixLak3IdlPJRaGtMXgB7\"\n \ }\n ],\n \"links\": {\n \"bank_accounts.credits\": \"/bank_accounts/{bank_accounts.id}/credits\",\n \ \"bank_accounts.bank_account_verifications\": \"/bank_accounts/{bank_accounts.id}/verifications\",\n \ \"bank_accounts.customer\": \"/customers/{bank_accounts.customer}\",\n @@ -111,19 +111,19 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF response: body: string: !!binary |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UOq1F3WFtqrBN1mPeRUV+EbgB9vrl8uM69cJ7jv71HOG8ANeOedbF + YR7suD6MI/KIBCtat7Kjx1F6UfDInA6Fhzsl2dNosHipMTmalJC5hEZKlDU8JTFiFrj+bX3DB+9K + L5jB/hqmBKTg/5qJ4dGhnG0JS06QiEm53lnDEuQZFfGNwkJj4h6vhMYFMtKBR8KKVA8TaIH9G15m + 3CWOoNgEixSkoqe3/Z1wjpiIC08tTeZpAsH9Gq6Gf35I1iBTBgAA headers: content-encoding: [gzip] content-length: ['495'] @@ -133,19 +133,19 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF response: body: string: !!binary | - H4sIAAAAAAAAA41UQW7bMBC85xWCznVkyS6a+JqiPeQWtCjgohBWJBMRkUiFpIoahv7epS3JNKmU - veiwOzPkzo54vEmSlPTayJYpne6Sn1hIkuPpiy0BLcOq6Jvmw1RruHi10AmEMC17RXwg1inThgsw - XIpRZRQZZrW+o2AYLcEgIi3W+Xa1/rRa59/yfLcpdkV+e/+x2Nzn+3SmEMUilLvNXVFsHAqVVdlK - YWp/GE7tsQ/fi6ft/g2eHj/v5Y/8a/f8wh6/VOpyZldL4Q+Y1oo9W3o2O5jFldBoUoMwpTZgemtk - KuSqBUPqy3EtM+BZzN4sdJ0GDtrZDgyUPxpQqpj2NkW4OXhA3BOulBXL5Tws24v7XqBIJ7HRlETS - hSaRvTDq4HaDQape4z20LpdSp7UoG9Bm64/JWuBNUORXgRvwrF82P3ZSJ7yX6N/OEU4zdO2UZ50d - 58WO/WFckUMkoGhZy4aeVulEwSFzOmQO7pxkR6MC8VoCOZkUkbmGBkqUVTwmMWIWuO7f+o4Pzi+9 - YAb7Y5gSmIL/GyaEB5eytkUsOUMCJuW66w2LkGdUwDcKhAZiH6+IxhUy0MFHohexGSbQAvs3vszQ - RK6g2AQLFKSi57f9H+EcMQEXn1oazdMEwv9ruBn+AkKZuqpTBgAA + H4sIAAAAAAAAA41UTW/cIBS851dYPnfjZe1spFwTVZVyaFS1h7aqLAxERrFhw0fb1cr/vY9d28uC + EypZPjxmBt68gcNVluXEaiN7pnR+l/2EQpYdjn9YErhnUBW26z5MtY6LFwedQADT0ioSAqFOmTZc + YMOlGFVGkWFWszuKDaM1NoDIN2tUrda3qzX6im7uqhK+65vytkTbH/lMIYolKBXalgh5FCqbupfC + tGEznLpt77+Vj/LxS4M25cPT90/lfqv+VJ/7j+c9d60UYYN5q9izoxezg0VaCYwmLRam1gYb64zM + hVz12JD2vF3PDA4sZq8Ous4jB11ve4ZV2BqmVDEdTIpwsw+AMCcYKdssl1FcdgcPvQCRnYSFriaS + LiwSaYVRe381aqSxGs6hdb2UOq1F3WFtqrBN1mPeRUV+EbgB9vrl8uM69cJ7jv71HOG8ANeOedbF + YR7suD6MI/KIBCtat7Kjx1F6UfDInA6Fhzsl2dNosHipMTmalJC5hEZKlDU8JTFiFrj+bX3DB+9K + L5jB/hqmBKTg/5qJ4dGhnG0JS06QiEm53lnDEuQZFfGNwkJj4h6vhMYFMtKBR8KKVA8TaIH9G15m + 3CWOoNgEixSkoqe3/Z1wjpiIC08tTeZpAsH9Gq6Gf35I1iBTBgAA headers: content-encoding: [gzip] content-length: ['495'] @@ -155,13 +155,13 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0 response: body: {string: !!python/unicode "{\n \"bank_accounts\": [],\n \"meta\": {\n - \ \"last\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0\",\n - \ \"next\": null,\n \"href\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0\",\n + \ \"last\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0\",\n + \ \"next\": null,\n \"href\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0\",\n \ \"limit\": 10,\n \"offset\": 0,\n \"previous\": null,\n \"total\": - 0,\n \"first\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0\"\n + 0,\n \"first\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0\"\n \ },\n \"links\": {}\n}"} headers: content-length: ['396'] @@ -171,70 +171,70 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/bank_accounts/BA3dHpK9BMTGleJbwQyO9U2B + uri: https://api.balancedpayments.com:443/bank_accounts/BA4hixLak3IdlPJRaGtMXgB7 response: body: string: !!binary | - H4sIAAAAAAAAA5VT0W6bMBR971cgntdgg5OMvCVb1XVVE3VLXzpNyNiX1QoBZMy2KOLfZ1yogaRS - xoMffA7X595z7vHKcdyYZruIMpZXmSrdhfNDXzrO0ZwalnmlRPYryqp9DFLjbuBjPCcfp9j90JFM - jYzuocG/L9fOw3J7s3E+fbv5fLd1ntZ3m7Ult29F6lAYPnsBttNPWEZXaZkKBs7txLmXEJcWT0W2 - a6R2IrVMVpUq3xuBWZWmnbJRf9FvkCIRjCqRZy217aF+a4bRLGISuFCaoWQFFpFAFfCINojrI0yu - 0fwa4S3Gi8BfEDwJp9j3g2crNdGNgSykyMw/0wTFNExokGBNhAQHcUgIJYjGCRACc9Aw4FkYEJgR - H6EQBywmjCCfMsDEFq4KfomWWU/Li4SkEeENLPdWy4B/Ke7D1cP2NoWv8Z/HwyZ88lf2rT0o2ozb - zqjz0Kbir/kQQr1YUM4llGOnhDqcuqQtBf/8NT69LpXu/fS6yDWQRiznZ0ATcHnoo2et5xAb5xOa - ltZ6wZvJvTsqU6nW588mLO4woMMVm7xmq5nK2InjwJiJ4LXXkV8zOKrUpw+ifWHx/jZ06zUWa/fK - 9bolK72R0g6o28yMipiRXqip5f5fv2aWg27GCt8dVe1qw+qr+h9WEmkmDAUAAA== + H4sIAAAAAAAAA5VT0W6bMBR971dYPK+JDU4y8pZuVZVtTacuk6pOEzLm0lghJjJmahTx7zMuzEBS + KePBDz6H63PvOfd4hZAXM7mNGOd5KXXhzdEvc4nQ0Z4GVnmphXyJZLmLQRncC3xCZvTjhHgfWpKt + IdkOavzHYoXuF+vbB/Tp8fbzco1+rpYPK0du3or0YW/5fAN8a55wjLbSIhMc0N0IfVUQFw7PhNzW + UluRRiYvC53vrEBZZlmrbNBf9AeUSAVnWuSyoTY9VP+a4UxGXEEitGFoVYJDFDANScRqxPMxodd4 + do3JmkzmlM6JP5pOwwkmz05qahoDtVdC2n8mKY5ZmLIgJcT3ISVBHFLKKGZxCpTCDAwMZBoGFKbU + xzgkAY8pp9hnHAh1hct9cokW2tGyUZDWIsY9y8c3C7oRr9/YNlgm2fcvj+xO3z+93MzcWzvQrB63 + m1HroUvFq/0wxp1YsCRRUAydEvpw6pKxFPzz1+T0utCm99PrfW6ALOJ5cga0AVeHLnrW+gRi63zK + ssJZL5J6cu+OylaqzPm7DovXD2h/xUZv2aqnMnTi2DNmJJJq3JLfMjio1KX3on1h8e42tOs1FOv2 + yhu3S1aMB0pboGoyMyhiR3qhpob7f/3aWfa6GSp8d1SVZwyrrqq/OOOhGAwFAAA= headers: content-encoding: [gzip] - content-length: ['502'] + content-length: ['503'] content-type: [application/json] status: {code: 200, message: OK} - request: body: '{"routing_number": "321174851", "bank_name": "SAN MATEO CREDIT UNION", "account_type": "checking", "name": "Alice G. Krebs", "links": {"customer": - "/customers/CU2R4ZqaRKDZoW1GpfgeKFbr"}, "can_credit": true, "created_at": "2014-07-01T11:32:41.951223Z", + "/customers/CU3KoKRb123DPYH3y6rw4OmF"}, "can_credit": true, "created_at": "2014-07-01T15:44:12.669501Z", "address": {"city": null, "line2": null, "line1": null, "state": null, "postal_code": - null, "country_code": null}, "updated_at": "2014-07-01T11:32:41.951226Z", "meta": + null, "country_code": null}, "updated_at": "2014-07-01T15:44:12.669504Z", "meta": {}, "account_number": "xxxxxx0001", "fingerprint": "5f0ba9fa3f1122ef13b944a40abfe44e7eba9e16934e64200913cb4c402ace14", - "can_debit": false, "id": "BA3dHpK9BMTGleJbwQyO9U2B"}' + "can_debit": false, "id": "BA4hixLak3IdlPJRaGtMXgB7"}' headers: {} method: PUT - uri: https://api.balancedpayments.com:443/bank_accounts/BA3dHpK9BMTGleJbwQyO9U2B + uri: https://api.balancedpayments.com:443/bank_accounts/BA4hixLak3IdlPJRaGtMXgB7 response: body: string: !!binary | - H4sIAAAAAAAAA5VTW2+bMBR+769APK/EBicZeUvaLuuiJlqWaFKmCRlz3FohwIxZF0X89xkC5dJ0 - 6njwg7/D8Xc553RlGKZPo71HGYuzSKXmxPihLw3jVJ4alnGmRPToRdnBB6lx07ExHpOPQ2x+qIvK - HhE9QIF/my6Nh+nmbmXcrO9u7zfGdnm/WjbF1VueOiZlPXsCttdPNBV1p2koGBhzy1hI8NMGD0W0 - L6jWJDVNlqUqPpwJ3mztNdn9ouvF7S7+jucJf4TFJ1++NOip9n6DFFwwqkQc6bZRFoaVsvxFIqOR - xyQEQukKJTNoEAlUQeDRAjFthMk1Gl8jvMF44tgTgi13iG3b2TUCuJYLMpEiKv8ZcuRTl1OHY10I - HDu+SwgliPocCIExaBjwyHUIjIiNkIsd5hNGkE0ZYNI0zpLgn1wcazR0yQi3uDxJ4AWJQWcQBrOp - E3xOFu7sYTMP4Yv//PW4crf2rHnrAIoWITQe1ck2s/Kn/BBCrWGhQSAh7ecn1LGyvjZWp6SDBvvy - NX59nSqt/fV1Emsg9FgcXADLsZfHNnox+gD8MnlOw7SJXgSFc29aVXbK9fmz0FSoaY1td/Gs82wV - rvSTOHWCsUSQD+ris1W9Tu3yzmi/s3l7G+ql65NtbdugXr100GNaA3k1M70mpaXv5FTV/p/e0suO - mj7DN63KTR1YfpX/BfGP3OgiBQAA + H4sIAAAAAAAAA5VTW2+bMBR+769APK/BBgMjb+llXZY1qbJU2kUVMubQWCEQGdM1ivjvMwTKpenU + 8uAHf4fj73LO4UzT9IAmG58yluaJzPSx9kddatqhOhUs0lzy5NFP8m0AQuG6ZWLsks821j81RVWP + hG6hxH9M5trtZHW90C6X11fTlXY/ny7mbXH9li/3u6qerYFt1BNtRdNpEnMG2s1ImwkIshaPebIp + qTYkFU2WZzLdHgle3luzdLYMsGld3f36au0d8Zcstl9eGgxU+08geMQZlTxNVNskj+NaWfEikdHE + ZwJCLlWFFDm0iAAqIfRpiegmwuQcuecIr7A9JmSMzZHjeDbCv1sBkZILYid4Uv1jRyigXkStCGPT + hAhbgUcIJYgGERACLigYsONZBBxiIuRhiwWEEWRSBpi0jfNd+F8uzgi52LS7XNYCopKE0RsE42JC + 1vz5O91Y0zC++7akN/L25+OF2761BUnLEFqPmmTbWXmuPoRQZ1hoGArIhvlxua+tb4xVKamgwTx9 + jV9fZ1Jpf329SxUQ+ywNT4DV2It9Fz0ZfQhBlXxE46yNnoelc29aVXUq1PlQairVdMa2v3ij42yV + rgyTOPSCGfGwMJrio1WDTt3y3mi/s3l3G5qlG5LtbJvRrF5mDJg2QFHPzKBJZek7OdW1H9NbedlT + M2T4plWFrgIrzop/+IVNBSIFAAA= headers: content-encoding: [gzip] - content-length: ['534'] + content-length: ['533'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF response: body: string: !!binary | - H4sIAAAAAAAAA41UQW7bMBC85xWCznVkyS6a+JqiPeQWtCjgohBWJBMRkUiFpIoahv7epS3JNKmU - veiwOzPkzo54vEmSlPTayJYpne6Sn1hIkuPpiy0BLcOq6Jvmw1RruHi10AmEMC17RXwg1inThgsw - XIpRZRQZZrW+o2AYLcEgIi3W+Xa1/rRa59/yfLcp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KBR8KKVA8TaIH9G15m + 3CWOoNgEixSkoqe3/Z1wjpiIC08tTeZpAsH9Gq6Gf35I1iBTBgAA headers: content-encoding: [gzip] content-length: ['495'] @@ -244,21 +244,21 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA61U72vbMBD93r/C+MM+rYlkK+lcKCP9sa4LTViXMOgYRpZPrahje7LcNoT875MU - O7bTdHTQfDDk7nT37r3HrQ4cx41o+hBSxrIyVYV77PzSQcdZ2a9Oy6xUIr0L03IRgdR51/cwPiKf - Btj9WBfZHildgMn/GE2c69HsYuqc3VycX82c+eRqOmmKq1mhWua2nt0De9Ajmoq60ygRDJzLnjOW - EBVNPhHpg4Fag9QwWVmobLEBeDb3bsjtH3ozPr/NfuLLnN/B+Esktw12tg4fQQouGFUiS3XbtEyS - arP1dkVG05BJiIXSFUqW0GQkUAVxSE3G9RAmh+joEOEZxse+d0xwLxhgz/NvmwW4XhdkLkVq3ww4 - imjAqc+xLgSO/SgghBJEIw6EwBHoNOBh4BMYEg+hAPssIowgjzLApGlc5vE/sfi94SAgQ9zCci+B - GxD9jhH6pyM//pqPg9Pr2WUC36Kn78tpMPdOm1kLUNSI0HBUK9t45dn+EEIts9A4llDs6ifUsqK+ - JlarpIUGb38YvwwXSu/+MpxnOpGELIv3JK3t5bKd3St9DJFVntOkaKQXsWHuVapsp7X+/jY7uTVh - NuwmtLDi92vrFv3XjNuV5nMiFkKdYPQh47wAdYIqTdwUnk1L498Nie5W3PcbYqfrKRhVMzYodKQO - 5BIeRVYahVtQVKZVMO+qZ1zI9yNAU2ptaBzTOg3d49azIhpYu2ZfdbzfE/G6X9VWYLv59r/O8Xhj - 7/a9qc/aDtT2PWs5ZAdoXbWuHdDFublXbwRVF//fxpbMzj79HYyvkrV2jWoH67+Jyu5WhgYAAA== + H4sIAAAAAAAAA61U227aQBB9z1dYfuhTg3ftBQpSVJFL05QGIkqkXlRZ6/U4rDA2Wq9TEOLfu7vY + 2CZQpVJ4sMTM7MyZc45mc2ZZdkCTuU8ZS/NEZnbf+qWClrUxX5UWaS558uQn+SIAofK252LcJR/a + 2H5fFpkeCV2Azn8bjKz7wfRmbF1Nbq7vptbj6G48qoqLWb5cL009mwGbqxFVRdlpEHMG1m3LGgoI + siof82SuoZYgFUyWZzJd7ABePXrDdDgJsOtdP/z47K074g8ZLz7tGxxs7T+D4BFnVPI0UW2TPI6L + zbb7FRlNfCYg5FJVSJFDlRFAJYQ+1RnbRZico+45wlPc7hPSx26r0+m1Ef5ZLRCpdUEsBU/Mm3aE + AtqLqBdh7LoQYS/oEUIJokEEhEAXVBpwp+cR6BAXoR72WEAYQS5lgEnVOF+G/8TSaaEudtt1LDMB + kQbhNIzgXA7IjK++0rl3F8YPXyb0Vt5/f7rsVrMWIKkWoeKoVLbyysr8EEI1s9AwFJAd6sfluqC+ + JFappIQG93gYvwxnUu3+MrxMVSL2WRoeSRrbi3U9e1T6EAKjfETjrJKeh5q5k1SZTlv1/a13skvC + TNiOaWbEd0rrZs4p4zal+RjzBZcXGL1LoygDeYEKTewEVrql9u+ORHsv7tsNMdPVFIyKGTsUKlIG + lgKeeZprhWtQZKpU0O+KZxEXb0eAotTYUDumdhqax61lRNSwDs2+aXi/xcOtU9QWYJv5+r/G8Xhl + 7/q9Kc/aAdT6Pas55ABoWbUtHdDEubtXrwRVFv/fxobMxj7OAcaTZG1trdrZ9i8rRFE8hgYAAA== headers: content-encoding: [gzip] content-length: ['625'] @@ -268,21 +268,21 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA61U72vbMBD93r/C+MM+rYlkK+lcKCP9sa4LTViXMOgYRpZPrahje7LcNoT875MU - O7bTdHTQfDDk7nT37r3HrQ4cx41o+hBSxrIyVYV77PzSQcdZ2a9Oy6xUIr0L03IRgdR51/cwPiKf - Btj9WBfZHildgMn/GE2c69HsYuqc3VycX82c+eRqOmmKq1mhWua2nt0De9Ajmoq60ygRDJzLnjOW - EBVNPhHpg4Fag9QwWVmobLEBeDb3bsjtH3ozPr/NfuLLnN/B+Esktw12tg4fQQouGFUiS3XbtEyS - arP1dkVG05BJiIXSFUqW0GQkUAVxSE3G9RAmh+joEOEZxse+d0xwLxhgz/NvmwW4XhdkLkVq3ww4 - imjAqc+xLgSO/SgghBJEIw6EwBHoNOBh4BMYEg+hAPssIowgjzLApGlc5vE/sfi94SAgQ9zCci+B - GxD9jhH6pyM//pqPg9Pr2WUC36Kn78tpMPdOm1kLUNSI0HBUK9t45dn+EEIts9A4llDs6ifUsqK+ - JlarpIUGb38YvwwXSu/+MpxnOpGELIv3JK3t5bKd3St9DJFVntOkaKQXsWHuVapsp7X+/jY7uTVh - NuwmtLDi92vrFv3XjNuV5nMiFkKdYPQh47wAdYIqTdwUnk1L498Nie5W3PcbYqfrKRhVMzYodKQO - 5BIeRVYahVtQVKZVMO+qZ1zI9yNAU2ptaBzTOg3d49azIhpYu2ZfdbzfE/G6X9VWYLv59r/O8Xhj - 7/a9qc/aDtT2PWs5ZAdoXbWuHdDFublXbwRVF//fxpbMzj79HYyvkrV2jWoH67+Jyu5WhgYAAA== + H4sIAAAAAAAAA61U227aQBB9z1dYfuhTg3ftBQpSVJFL05QGIkqkXlRZ6/U4rDA2Wq9TEOLfu7vY + 2CZQpVJ4sMTM7MyZc45mc2ZZdkCTuU8ZS/NEZnbf+qWClrUxX5UWaS558uQn+SIAofK252LcJR/a + 2H5fFpkeCV2Azn8bjKz7wfRmbF1Nbq7vptbj6G48qoqLWb5cL009mwGbqxFVRdlpEHMG1m3LGgoI + siof82SuoZYgFUyWZzJd7ABePXrDdDgJsOtdP/z47K074g8ZLz7tGxxs7T+D4BFnVPI0UW2TPI6L + zbb7FRlNfCYg5FJVSJFDlRFAJYQ+1RnbRZico+45wlPc7hPSx26r0+m1Ef5ZLRCpdUEsBU/Mm3aE + AtqLqBdh7LoQYS/oEUIJokEEhEAXVBpwp+cR6BAXoR72WEAYQS5lgEnVOF+G/8TSaaEudtt1LDMB + kQbhNIzgXA7IjK++0rl3F8YPXyb0Vt5/f7rsVrMWIKkWoeKoVLbyysr8EEI1s9AwFJAd6sfluqC+ + JFappIQG93gYvwxnUu3+MrxMVSL2WRoeSRrbi3U9e1T6EAKjfETjrJKeh5q5k1SZTlv1/a13skvC + TNiOaWbEd0rrZs4p4zal+RjzBZcXGL1LoygDeYEKTewEVrql9u+ORHsv7tsNMdPVFIyKGTsUKlIG + lgKeeZprhWtQZKpU0O+KZxEXb0eAotTYUDumdhqax61lRNSwDs2+aXi/xcOtU9QWYJv5+r/G8Xhl + 7/q9Kc/aAdT6Pas55ABoWbUtHdDEubtXrwRVFv/fxobMxj7OAcaTZG1trdrZ9i8rRFE8hgYAAA== headers: content-encoding: [gzip] content-length: ['625'] @@ -292,19 +292,19 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF response: body: string: !!binary | - H4sIAAAAAAAAA41UQW7bMBC85xWCznVkyS6a+JqiPeQWtCjgohBWJBMRkUiFpIoahv7epS3JNKmU - veiwOzPkzo54vEmSlPTayJYpne6Sn1hIkuPpiy0BLcOq6Jvmw1RruHi10AmEMC17RXwg1inThgsw - XIpRZRQZZrW+o2AYLcEgIi3W+Xa1/rRa59/yfLcpdkV+e/+x2Nzn+3SmEMUilLvNXVFsHAqVVdlK - YWp/GE7tsQ/fi6ft/g2eHj/v5Y/8a/f8w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ers: content-encoding: [gzip] content-length: ['495'] @@ -314,19 +314,19 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF response: body: string: !!binary | - H4sIAAAAAAAAA41UQW7bMBC85xWCznVkyS6a+JqiPeQWtCjgohBWJBMRkUiFpIoahv7epS3JNKmU - veiwOzPkzo54vEmSlPTayJYpne6Sn1hIkuPpiy0BLcOq6Jvmw1RruHi10AmEMC17RXwg1inThgsw - XIpRZRQZZrW+o2AYLcEgIi3W+Xa1/rRa59/yfLcpdkV+e/+x2Nzn+3SmEMUilLvNXVFsHAqVVdlK - YWp/GE7tsQ/fi6ft/g2eHj/v5Y/8a/f8wh6/VOpyZldL4Q+Y1oo9W3o2O5jFldBoUoMwpTZgemtk - KuSqBUPqy3EtM+BZzN4sdJ0GDtrZDgyUPxpQqpj2NkW4OXhA3BOulBXL5Tws24v7XqBIJ7HRlETS - hSaRvTDq4HaDQape4z20LpdSp7UoG9Bm64/JWuBNUORXgRvwrF82P3ZSJ7yX6N/OEU4zdO2UZ50d - 58WO/WFckUMkoGhZy4aeVulEwSFzOmQO7pxkR6MC8VoCOZkUkbmGBkqUVTwmMWIWuO7f+o4Pzi+9 - YAb7Y5gSmIL/GyaEB5eytkUsOUMCJuW66w2LkGdUwDcKhAZiH6+IxhUy0MFHohexGSbQAvs3vszQ - RK6g2AQLFKSi57f9H+EcMQEXn1oazdMEwv9ruBn+AkKZuqpTBgAA + H4sIAAAAAAAAA41UTW/cIBS851dYPnfjZe1spFwTVZVyaFS1h7aqLAxERrFhw0fb1cr/vY9d28uC + EypZPjxmBt68gcNVluXEaiN7pnR+l/2EQpYdjn9YErhnUBW26z5MtY6LFwedQADT0ioSAqFOmTZc + YMOlGFVGkWFWszuKDaM1NoDIN2tUrda3qzX6im7uqhK+65vytkTbH/lMIYolKBXalgh5FCqbupfC + tGEznLpt77+Vj/LxS4M25cPT90/lfqv+VJ/7j+c9d60UYYN5q9izoxezg0VaCYwmLRam1gYb64zM + hVz12JD2vF3PDA4sZq8Ous4jB11ve4ZV2BqmVDEdTIpwsw+AMCcYKdssl1FcdgcPvQCRnYSFriaS + LiwSaYVRe381aqSxGs6hdb2UOq1F3WFtqrBN1mPeRUV+EbgB9vrl8uM69cJ7jv71HOG8ANeOedbF + YR7suD6MI/KIBCtat7Kjx1F6UfDInA6Fhzsl2dNosHipMTmalJC5hEZKlDU8JTFiFrj+bX3DB+9K + L5jB/hqmBKTg/5qJ4dGhnG0JS06QiEm53lnDEuQZFfGNwkJj4h6vhMYFMtKBR8KKVA8TaIH9G15m + 3CWOoNgEixSkoqe3/Z1wjpiIC08tTeZpAsH9Gq6Gf35I1iBTBgAA headers: content-encoding: [gzip] content-length: ['495'] @@ -336,13 +336,13 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0 response: body: {string: !!python/unicode "{\n \"cards\": [],\n \"meta\": {\n \"last\": - \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0\",\n \"next\": - null,\n \"href\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0\",\n + \"/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0\",\n \"next\": + null,\n \"href\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0\",\n \ \"limit\": 10,\n \"offset\": 0,\n \"previous\": null,\n \"total\": - 0,\n \"first\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0\"\n + 0,\n \"first\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0\"\n \ },\n \"links\": {}\n}"} headers: content-length: ['364'] @@ -358,8 +358,8 @@ interactions: \"Not Found\",\n \"category_code\": \"not-found\",\n \"description\": \"

The requested URL was not found on the server.

If you entered the URL manually please check your spelling and try again.

Your request id - is OHM6cbe9978011311e48ad106429171ffad.\",\n \"status_code\": 404,\n - \ \"category_type\": \"request\",\n \"request_id\": \"OHM6cbe9978011311e48ad106429171ffad\"\n + is OHM90c6a126013611e4a4e806429171ffad.\",\n \"status_code\": 404,\n + \ \"category_type\": \"request\",\n \"request_id\": \"OHM90c6a126013611e4a4e806429171ffad\"\n \ }\n ]\n}"} headers: content-length: ['430'] @@ -376,16 +376,16 @@ interactions: \ \"customer\": null\n },\n \"fingerprint\": \"1e2c425a579a1c7f27a037f0662b855035ceadbff18a0adbe785fb07e2afe1cc\",\n \ \"cvv_result\": null,\n \"number\": \"xxxxxxxxxxxx4242\",\n \"avs_postal_match\": null,\n \"expiration_month\": 12,\n \"meta\": {},\n \"id\": - \"CC3k3FMoyWzNKUsXNwXVDxGt\",\n \"category\": \"other\",\n \"type\": + \"CC4q3Nm89zMS5ujKwSr7wduZ\",\n \"category\": \"other\",\n \"type\": \"credit\",\n \"cvv_match\": null,\n \"bank_name\": \"\",\n \"avs_street_match\": - null,\n \"brand\": \"Visa\",\n \"updated_at\": \"2014-07-01T11:32:47.614703Z\",\n + null,\n \"brand\": \"Visa\",\n \"updated_at\": \"2014-07-01T15:44:20.460279Z\",\n \ \"address\": {\n \"city\": null,\n \"line2\": null,\n \ \"line1\": null,\n \"state\": null,\n \"postal_code\": null,\n \"country_code\": null\n },\n \"can_debit\": true,\n \ \"name\": null,\n \"expiration_year\": 2020,\n \"cvv\": null,\n \ \"is_verified\": true,\n \"avs_result\": null,\n \"can_credit\": - false,\n \"href\": \"/cards/CC3k3FMoyWzNKUsXNwXVDxGt\",\n \"created_at\": - \"2014-07-01T11:32:47.614700Z\"\n }\n ],\n \"links\": {\n \"cards.card_holds\": + false,\n \"href\": \"/cards/CC4q3Nm89zMS5ujKwSr7wduZ\",\n \"created_at\": + \"2014-07-01T15:44:20.460277Z\"\n }\n ],\n \"links\": {\n \"cards.card_holds\": \"/cards/{cards.id}/card_holds\",\n \"cards.customer\": \"/customers/{cards.customer}\",\n \ \"cards.disputes\": \"/cards/{cards.id}/disputes\",\n \"cards.debits\": \"/cards/{cards.id}/debits\"\n }\n}"} @@ -400,19 +400,19 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF response: body: string: !!binary | - H4sIAAAAAAAAA41UQW7bMBC85xWCznVkyS6a+JqiPeQWtCjgohBWJBMRkUiFpIoahv7epS3JNKmU - veiwOzPkzo54vEmSlPTayJYpne6Sn1hIkuPpiy0BLcOq6Jvmw1RruHi10AmEMC17RXwg1inThgsw - XIpRZRQZZrW+o2AYLcEgIi3W+Xa1/rRa59/yfLcpdkV+e/+x2Nzn+3SmEMUilLvNXVFsHAqVVdlK - YWp/GE7tsQ/fi6ft/g2eHj/v5Y/8a/f8wh6/VOpyZldL4Q+Y1oo9W3o2O5jFldBoUoMwpTZgemtk - KuSqBUPqy3EtM+BZzN4sdJ0GDtrZDgyUPxpQqpj2NkW4OXhA3BOulBXL5Tws24v7XqBIJ7HRlETS - hSaRvTDq4HaDQape4z20LpdSp7UoG9Bm64/JWuBNUORXgRvwrF82P3ZSJ7yX6N/OEU4zdO2UZ50d - 58WO/WFckUMkoGhZy4aeVulEwSFzOmQO7pxkR6MC8VoCOZkUkbmGBkqUVTwmMWIWuO7f+o4Pzi+9 - YAb7Y5gSmIL/GyaEB5eytkUsOUMCJuW66w2LkGdUwDcKhAZiH6+IxhUy0MFHohexGSbQAvs3vszQ - RK6g2AQLFKSi57f9H+EcMQEXn1oazdMEwv9ruBn+AkKZuqpTBgAA + H4sIAAAAAAAAA41UTW/cIBS851dYPnfjZe1spFwTVZVyaFS1h7aqLAxERrFhw0fb1cr/vY9d28uC + EypZPjxmBt68gcNVluXEaiN7pnR+l/2EQpYdjn9YErhnUBW26z5MtY6LFwedQADT0ioSAqFOmTZc + YMOlGFVGkWFWszuKDaM1NoDIN2tUrda3qzX6im7uqhK+65vytkTbH/lMIYolKBXalgh5FCqbupfC + tGEznLpt77+Vj/LxS4M25cPT90/lfqv+VJ/7j+c9d60UYYN5q9izoxezg0VaCYwmLRam1gYb64zM + hVz12JD2vF3PDA4sZq8Ous4jB11ve4ZV2BqmVDEdTIpwsw+AMCcYKdssl1FcdgcPvQCRnYSFriaS + LiwSaYVRe381aqSxGs6hdb2UOq1F3WFtqrBN1mPeRUV+EbgB9vrl8uM69cJ7jv71HOG8ANeOedbF + YR7suD6MI/KIBCtat7Kjx1F6UfDInA6Fhzsl2dNosHipMTmalJC5hEZKlDU8JTFiFrj+bX3DB+9K + L5jB/hqmBKTg/5qJ4dGhnG0JS06QiEm53lnDEuQZFfGNwkJj4h6vhMYFMtKBR8KKVA8TaIH9G15m + 3CWOoNgEixSkoqe3/Z1wjpiIC08tTeZpAsH9Gq6Gf35I1iBTBgAA headers: content-encoding: [gzip] content-length: ['495'] @@ -422,19 +422,19 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF response: body: string: !!binary | - H4sIAAAAAAAAA41UQW7bMBC85xWCznVkyS6a+JqiPeQWtCjgohBWJBMRkUiFpIoahv7epS3JNKmU - veiwOzPkzo54vEmSlPTayJYpne6Sn1hIkuPpiy0BLcOq6Jvmw1RruHi10AmEMC17RXwg1inThgsw - XIpRZRQZZrW+o2AYLcEgIi3W+Xa1/rRa59/yfLcpdkV+e/+x2Nzn+3SmEMUilLvNXVFsHAqVVdlK - YWp/GE7tsQ/fi6ft/g2eHj/v5Y/8a/f8wh6/VOpyZldL4Q+Y1oo9W3o2O5jFldBoUoMwpTZgemtk - KuSqBUPqy3EtM+BZzN4sdJ0GDtrZDgyUPxpQqpj2NkW4OXhA3BOulBXL5Tws24v7XqBIJ7HRlETS - hSaRvTDq4HaDQape4z20LpdSp7UoG9Bm64/JWuBNUORXgRvwrF82P3ZSJ7yX6N/OEU4zdO2UZ50d - 58WO/WFckUMkoGhZy4aeVulEwSFzOmQO7pxkR6MC8VoCOZkUkbmGBkqUVTwmMWIWuO7f+o4Pzi+9 - YAb7Y5gSmIL/GyaEB5eytkUsOUMCJuW66w2LkGdUwDcKhAZiH6+IxhUy0MFHohexGSbQAvs3vszQ - RK6g2AQLFKSi57f9H+EcMQEXn1oazdMEwv9ruBn+AkKZuqpTBgAA + H4sIAAAAAAAAA41UTW/cIBS851dYPnfjZe1spFwTVZVyaFS1h7aqLAxERrFhw0fb1cr/vY9d28uC + EypZPjxmBt68gcNVluXEaiN7pnR+l/2EQpYdjn9YErhnUBW26z5MtY6LFwedQADT0ioSAqFOmTZc + YMOlGFVGkWFWszuKDaM1NoDIN2tUrda3qzX6im7uqhK+65vytkTbH/lMIYolKBXalgh5FCqbupfC + tGEznLpt77+Vj/LxS4M25cPT90/lfqv+VJ/7j+c9d60UYYN5q9izoxezg0VaCYwmLRam1gYb64zM + hVz12JD2vF3PDA4sZq8Ous4jB11ve4ZV2BqmVDEdTIpwsw+AMCcYKdssl1FcdgcPvQCRnYSFriaS + LiwSaYVRe381aqSxGs6hdb2UOq1F3WFtqrBN1mPeRUV+EbgB9vrl8uM69cJ7jv71HOG8ANeOedbF + YR7suD6MI/KIBCtat7Kjx1F6UfDInA6Fhzsl2dNosHipMTmalJC5hEZKlDU8JTFiFrj+bX3DB+9K + L5jB/hqmBKTg/5qJ4dGhnG0JS06QiEm53lnDEuQZFfGNwkJj4h6vhMYFMtKBR8KKVA8TaIH9G15m + 3CWOoNgEixSkoqe3/Z1wjpiIC08tTeZpAsH9Gq6Gf35I1iBTBgAA headers: content-encoding: [gzip] content-length: ['495'] @@ -444,13 +444,13 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0 response: body: {string: !!python/unicode "{\n \"cards\": [],\n \"meta\": {\n \"last\": - \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0\",\n \"next\": - null,\n \"href\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0\",\n + \"/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0\",\n \"next\": + null,\n \"href\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0\",\n \ \"limit\": 10,\n \"offset\": 0,\n \"previous\": null,\n \"total\": - 0,\n \"first\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0\"\n + 0,\n \"first\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0\"\n \ },\n \"links\": {}\n}"} headers: content-length: ['364'] @@ -460,73 +460,73 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/cards/CC3k3FMoyWzNKUsXNwXVDxGt + uri: https://api.balancedpayments.com:443/cards/CC4q3Nm89zMS5ujKwSr7wduZ response: body: string: !!binary | - H4sIAAAAAAAAA41UwY6bMBC971cgzt3ENhDSXLdqD1X31G5Xu6qQsYeNFTDINmnSiH+vbUgg2URa - Dhae8Zt5M/Psw10QhIwqrsNV8Go3QXDwqzWXQm6c+WhwJ1tt6gqUtcq2LIeT3acjpBDyDVSjhDT2 - SIiBsJgkNEk/U8zSgqQURWmBFguSL5MERQkDyvOiwEuK7A+ky6TIUQqEFoAZC0+B2XabKdBt6eK6 - 1CePbKvcEwp3ky8mMRnRdKuzptaGlllFDVtfxoBdIxQ1opZZVUvj/JicMlRgqGvDWKbgLt/DQ7SJ - vv6o97//PX7/pZ8f/z4/fdl9MxPW1MBb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headers: content-encoding: [gzip] - content-length: ['525'] + content-length: ['521'] content-type: [application/json] status: {code: 200, message: OK} - request: - body: '{"links": {"customer": "/customers/CU2R4ZqaRKDZoW1GpfgeKFbr"}, "cvv_result": + body: '{"links": {"customer": "/customers/CU3KoKRb123DPYH3y6rw4OmF"}, "cvv_result": null, "number": "xxxxxxxxxxxx4242", "avs_postal_match": null, "expiration_month": - 12, "meta": {}, "id": "CC3k3FMoyWzNKUsXNwXVDxGt", "category": "other", "type": + 12, "meta": {}, "id": "CC4q3Nm89zMS5ujKwSr7wduZ", "category": "other", "type": "credit", "cvv_match": null, "bank_name": "", "avs_street_match": null, "brand": - "Visa", "updated_at": "2014-07-01T11:32:47.614703Z", "fingerprint": "1e2c425a579a1c7f27a037f0662b855035ceadbff18a0adbe785fb07e2afe1cc", + "Visa", "updated_at": "2014-07-01T15:44:20.460279Z", "fingerprint": "1e2c425a579a1c7f27a037f0662b855035ceadbff18a0adbe785fb07e2afe1cc", "can_debit": true, "name": null, "expiration_year": 2020, "can_credit": false, - "is_verified": true, "avs_result": null, "cvv": null, "created_at": "2014-07-01T11:32:47.614700Z", + "is_verified": true, "avs_result": null, "cvv": null, "created_at": "2014-07-01T15:44:20.460277Z", "address": {"city": null, "line2": null, "line1": null, "state": null, "postal_code": null, "country_code": null}}' headers: {} method: PUT - uri: https://api.balancedpayments.com:443/cards/CC3k3FMoyWzNKUsXNwXVDxGt + uri: https://api.balancedpayments.com:443/cards/CC4q3Nm89zMS5ujKwSr7wduZ response: body: string: !!binary | - H4sIAAAAAAAAA41UTW/iMBC991dEOW/BNgmhXFu1B7Q9VNsPUa0ix56AReJkbYeFRfz3tfMBgcJq - c4iSGb+ZNzPPs7vxPJ9RxbU/9T7tj+ft6rc1Z0KunLkzuJOVNkUOylr9+1fyEsx/0ZfZw7x4x09l - uoDZY6L8Fr//1gVKhVyAKpWQxgExEBaQkIbRHcUsSklE0ShK0XhMkkkYolHIgPIkTfGEIvsB0SRM - ExQBoSlgxvxDYL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ASVyAW6+Jw2c3y671XEaVr70clroI6u1gtwW8ufdIZ3/ + h7sU/HOHaBYuEInjh/6ctnZAP52gs+PeXwoz1zVdV0V3P4wk9h2XmeBtx2rI91MZcZOLYj7eGno+ + IMdAO1hvAHGh68bAK60O2ZNG3SpfQ/Q5K669av8C0Edhy+oEAAA= headers: content-encoding: [gzip] - content-length: ['550'] + content-length: ['551'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF response: body: string: !!binary | - H4sIAAAAAAAAA41UQW7bMBC85xWCznVkyS6a+JqiPeQWtCjgohBWJBMRkUiFpIoahv7epS3JNKmU - veiwOzPkzo54vEmSlPTayJYpne6Sn1hIkuPpiy0BLcOq6Jvmw1RruHi10AmEMC17RXwg1inThgsw - XIpRZRQZZrW+o2AYLcEgIi3W+Xa1/rRa59/yfLcpdkV+e/+x2Nzn+3SmEMUilLvNXVFsHAqVVdlK - YWp/GE7tsQ/fi6ft/g2eHj/v5Y/8a/f8wh6/VOpyZldL4Q+Y1oo9W3o2O5jFldBoUoMwpTZgemtk - KuSqBUPqy3EtM+BZzN4sdJ0GDtrZDgyUPxpQqpj2NkW4OXhA3BOulBXL5Tws24v7XqBIJ7HRlETS - hSaRvTDq4HaDQape4z20LpdSp7UoG9Bm64/JWuBNUORXgRvwrF82P3ZSJ7yX6N/OEU4zdO2UZ50d - 58WO/WFckUMkoGhZy4aeVulEwSFzOmQO7pxkR6MC8VoCOZkUkbmGBkqUVTwmMWIWuO7f+o4Pzi+9 - YAb7Y5gSmIL/GyaEB5eytkUsOUMCJuW66w2LkGdUwDcKhAZiH6+IxhUy0MFHohexGSbQAvs3vszQ - RK6g2AQLFKSi57f9H+EcMQEXn1oazdMEwv9ruBn+AkKZuqpTBgAA + H4sIAAAAAAAAA41UTW/cIBS851dYPnfjZe1spFwTVZVyaFS1h7aqLAxERrFhw0fb1cr/vY9d28uC + EypZPjxmBt68gcNVluXEaiN7pnR+l/2EQpYdjn9YErhnUBW26z5MtY6LFwedQADT0ioSAqFOmTZc + YMOlGFVGkWFWszuKDaM1NoDIN2tUrda3qzX6im7uqhK+65vytkTbH/lMIYolKBXalgh5FCqbupfC + tGEznLpt77+Vj/LxS4M25cPT90/lfqv+VJ/7j+c9d60UYYN5q9izoxezg0VaCYwmLRam1gYb64zM + hVz12JD2vF3PDA4sZq8Ous4jB11ve4ZV2BqmVDEdTIpwsw+AMCcYKdssl1FcdgcPvQCRnYSFriaS + LiwSaYVRe381aqSxGs6hdb2UOq1F3WFtqrBN1mPeRUV+EbgB9vrl8uM69cJ7jv71HOG8ANeOedbF + YR7suD6MI/KIBCtat7Kjx1F6UfDInA6Fhzsl2dNosHipMTmalJC5hEZKlDU8JTFiFrj+bX3DB+9K + L5jB/hqmBKTg/5qJ4dGhnG0JS06QiEm53lnDEuQZFfGNwkJj4h6vhMYFMtKBR8KKVA8TaIH9G15m + 3CWOoNgEixSkoqe3/Z1wjpiIC08tTeZpAsH9Gq6Gf35I1iBTBgAA headers: content-encoding: [gzip] content-length: ['495'] @@ -536,22 +536,22 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA6VUTW/bMAy991cYOuy0JpJix22AYocW7aFYD8X6gQyDIdtUI9SWPFnOkgX575X8 - ETtpOgxbDkFCiuQj3yM3J56HEqbTEs287/aP523qb2vOhHx15s7gXlalUTloa0WXD/Ten/9k97dX - c/VEbgr+ArfXsUZt/PZzl4gL+QK60EIaF0iAJj4NWBCeM5KEnIYMT0KOp1ManwUBngQJsDTmnJwx - bH9AeBbwGIdAGQeSJGiXOFkuIw1llbm8ss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zw8CxTLi23Y0ZafUE5LTZf2o2vGjb1VGSjrBM5iecmWyEVttk5H0ixoyK + JIfUTHfhadXAIJl2igcyGklgC9TKnmCCx/o7Qoh4naxBccbBzveggNXbabVaTB3lC4/Roh5QrRQw + kwhN3ZJO/0JdCv7IIZ6EM0zi+Kbd050Z0A/bEOoF7SaGClo7EUz7lTe1n1n4FtqrgpdcX/r4hWSs + Bn2JO10hAfeH+4mGprp78u/JXVUD1O9YQW11Y+kNlYI1l42V6MAt0tLsvY1ryUSMq/9v2IzOnYOj + 09ke2EnO66rRYIH0dD46Vic830333g5Q6xkf3BEVXVzv3fWj7oJM0mQlC3fUT5Syrzr/QTG3Fs/E + dD7b4dnuN0A3AAY2BgAA headers: content-encoding: [gzip] content-length: ['642'] @@ -561,22 +561,22 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA6VUTW/bMAy991cYOuy0JpJix22AYocW7aFYD8X6gQyDIdtUI9SWPFnOkgX575X8 - ETtpOgxbDkFCiuQj3yM3J56HEqbTEs287/aP523qb2vOhHx15s7gXlalUTloa0WXD/Ten/9k97dX - c/VEbgr+ArfXsUZt/PZzl4gL+QK60EIaF0iAJj4NWBCeM5KEnIYMT0KOp1ManwUBngQJsDTmnJwx - bH9AeBbwGIdAGQeSJGiXOFkuIw1llbm8ssqynUdWedzAXA0+PvVpH82WZVSo0rAsyplJFoc5YFUI - zYxQMsqVNM5P6K5CDoa54fRtirQey+XkdXL9Va2fft/dPpTPd7+eH69WN2aAmhl4UXrtXiuzsDB3 - Sc26AGdONKRiGGIbPYoxZvI1kiyvo/ZbK40GMB+EaSZrtI+iZH1YVaQWWxqxmieKiX+Kw1NMvhEy - m9CZfz4KQjwNyHxQKU0tA4cyEcZ1N2S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p78u/JXVUD1O9YQW11Y+kNlYI1l42V6MAt0tLsvY1ryUSMq/9v2IzOnYOj + 09ke2EnO66rRYIH0dD46Vic830333g5Q6xkf3BEVXVzv3fWj7oJM0mQlC3fUT5Syrzr/QTG3Fs/E + dD7b4dnuN0A3AAY2BgAA headers: content-encoding: [gzip] content-length: ['642'] diff --git a/tests/py/fixtures/TestBillingClear.yml b/tests/py/fixtures/TestBillingClear.yml index 485e00085a..d8e6763880 100644 --- a/tests/py/fixtures/TestBillingClear.yml +++ b/tests/py/fixtures/TestBillingClear.yml @@ -3,19 +3,19 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF response: body: string: !!binary | - H4sIAAAAAAAAA41UQW7bMBC85xWCznVkyS6a+JqiPeQWtCjgohBWJBMRkUiFpIoahv7epS3JNKmU - veiwOzPkzo54vEmSlPTayJYpne6Sn1hIkuPpiy0BLcOq6Jvmw1RruHi10AmEMC17RXwg1inThgsw - XIpRZRQZZrW+o2AYLcEgIi3W+Xa1/rRa59/yfLcpdkV+e/+x2Nzn+3SmEMUilLvNXVFsHAqVVdlK - YWp/GE7tsQ/fi6ft/g2eHj/v5Y/8a/f8wh6/VOpyZldL4Q+Y1oo9W3o2O5jFldBoUoMwpTZgemtk - KuSqBUPqy3EtM+BZzN4sdJ0GDtrZDgyUPxpQqpj2NkW4OXhA3BOulBXL5Tws24v7XqBIJ7HRlETS - hSaRvTDq4HaDQape4z20LpdSp7UoG9Bm64/JWuBNUORXgRvwrF82P3ZSJ7yX6N/OEU4zdO2UZ50d - 58WO/WFckUMkoGhZy4aeVulEwSFzOmQO7pxkR6MC8VoCOZkUkbmGBkqUVTwmMWIWuO7f+o4Pzi+9 - YAb7Y5gSmIL/GyaEB5eytkUsOUMCJuW66w2LkGdUwDcKhAZiH6+IxhUy0MFHohexGSbQAvs3vszQ - RK6g2AQLFKSi57f9H+EcMQEXn1oazdMEwv9ruBn+AkKZuqpTBgAA + H4sIAAAAAAAAA41UTW/cIBS851dYPnfjZe1spFwTVZVyaFS1h7aqLAxERrFhw0fb1cr/vY9d28uC + EypZPjxmBt68gcNVluXEaiN7pnR+l/2EQpYdjn9YErhnUBW26z5MtY6LFwedQADT0ioSAqFOmTZc + YMOlGFVGkWFWszuKDaM1NoDIN2tUrda3qzX6im7uqhK+65vytkTbH/lMIYolKBXalgh5FCqbupfC + tGEznLpt77+Vj/LxS4M25cPT90/lfqv+VJ/7j+c9d60UYYN5q9izoxezg0VaCYwmLRam1gYb64zM + hVz12JD2vF3PDA4sZq8Ous4jB11ve4ZV2BqmVDEdTIpwsw+AMCcYKdssl1FcdgcPvQCRnYSFriaS + LiwSaYVRe381aqSxGs6hdb2UOq1F3WFtqrBN1mPeRUV+EbgB9vrl8uM69cJ7jv71HOG8ANeOedbF + YR7suD6MI/KIBCtat7Kjx1F6UfDInA6Fhzsl2dNosHipMTmalJC5hEZKlDU8JTFiFrj+bX3DB+9K + L5jB/hqmBKTg/5qJ4dGhnG0JS06QiEm53lnDEuQZFfGNwkJj4h6vhMYFMtKBR8KKVA8TaIH9G15m + 3CWOoNgEixSkoqe3/Z1wjpiIC08tTeZpAsH9Gq6Gf35I1iBTBgAA headers: content-encoding: [gzip] content-length: ['495'] @@ -25,22 +25,22 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA6VUTW/bMAy991cYOuy0JpJix22AYocW7aFYD8X6gQyDIdtUI9SWPFnOkgX575X8 - ETtpOgxbDkFCiuQj3yM3J56HEqbTEs287/aP523qb2vOhHx15s7gXlalUTloa0WXD/Ten/9k97dX - c/VEbgr+ArfXsUZt/PZzl4gL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eNnsSYUnGXCFq6qMPWaq0A9OnWUkWFQ/uV13QIa6rcYMsT6ngi2A/PcXyO/c9+ + tAjDBQkmfjCPwmjUDM1zw8CxTLi23Y0ZafUE5LTZf2o2vGjb1VGSjrBM5iecmWyEVttk5H0ixoyK + JIfUTHfhadXAIJl2igcyGklgC9TKnmCCx/o7Qoh4naxBccbBzveggNXbabVaTB3lC4/Roh5QrRQw + kwhN3ZJO/0JdCv7IIZ6EM0zi+Kbd050Z0A/bEOoF7SaGClo7EUz7lTe1n1n4FtqrgpdcX/r4hWSs + Bn2JO10hAfeH+4mGprp78u/JXVUD1O9YQW11Y+kNlYI1l42V6MAt0tLsvY1ryUSMq/9v2IzOnYOj + 09ke2EnO66rRYIH0dD46Vic830333g5Q6xkf3BEVXVzv3fWj7oJM0mQlC3fUT5Syrzr/QTG3Fs/E + dD7b4dnuN0A3AAY2BgAA headers: content-encoding: [gzip] content-length: ['642'] @@ -50,7 +50,7 @@ interactions: body: null headers: {} method: DELETE - uri: https://api.balancedpayments.com:443/cards/CC3k3FMoyWzNKUsXNwXVDxGt + uri: https://api.balancedpayments.com:443/cards/CC4q3Nm89zMS5ujKwSr7wduZ response: body: {string: !!python/unicode ''} headers: @@ -61,19 +61,19 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF response: body: string: !!binary | - H4sIAAAAAAAAA41UQW7bMBC85xWCznVkyS6a+JqiPeQWtCjgohBWJBMRkUiFpIoahv7epS3JNKmU - veiwOzPkzo54vEmSlPTayJYpne6Sn1hIkuPpiy0BLcOq6Jvmw1RruHi10AmEMC17RXwg1inThgsw - XIpRZRQZZrW+o2AYLcEgIi3W+Xa1/rRa59/yfLcpdkV+e/+x2Nzn+3SmEMUilLvNXVFsHAqVVdlK - YWp/GE7tsQ/fi6ft/g2eHj/v5Y/8a/f8wh6/VOpyZldL4Q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content-length: ['495'] @@ -83,13 +83,13 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0 response: body: {string: !!python/unicode "{\n \"cards\": [],\n \"meta\": {\n \"last\": - \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0\",\n \"next\": - null,\n \"href\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0\",\n + \"/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0\",\n \"next\": + null,\n \"href\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0\",\n \ \"limit\": 10,\n \"offset\": 0,\n \"previous\": null,\n \"total\": - 0,\n \"first\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0\"\n + 0,\n \"first\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0\"\n \ },\n \"links\": {}\n}"} headers: content-length: ['364'] @@ -99,13 +99,13 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0 response: body: {string: !!python/unicode "{\n \"cards\": [],\n \"meta\": {\n \"last\": - \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0\",\n \"next\": - null,\n \"href\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0\",\n + \"/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0\",\n \"next\": + null,\n \"href\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0\",\n \ \"limit\": 10,\n \"offset\": 0,\n \"previous\": null,\n \"total\": - 0,\n \"first\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/cards?limit=10&offset=0\"\n + 0,\n \"first\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/cards?limit=10&offset=0\"\n \ },\n \"links\": {}\n}"} headers: content-length: ['364'] @@ -115,19 +115,19 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF response: body: string: !!binary | - H4sIAAAAAAAAA41UQW7bMBC85xWCznVkyS6a+JqiPeQWtCjgohBWJBMRkUiFpIoahv7epS3JNKmU - veiwOzPkzo54vEmSlPTayJYpne6Sn1hIkuPpiy0BLcOq6Jvmw1RruHi10AmEMC17RXwg1inThgsw - XIpRZRQZZrW+o2AYLcEgIi3W+Xa1/rRa59/yfLcpdkV+e/+x2Nzn+3SmEMUilLvNXVFsHAqVVdlK - YWp/GE7tsQ/fi6ft/g2eHj/v5Y/8a/f8wh6/VOpyZldL4Q+Y1oo9W3o2O5jFldBoUoMwpTZgemtk - KuSqBUPqy3EtM+BZzN4sdJ0GDtrZDgyUPxpQqpj2NkW4OXhA3BOulBXL5Tws24v7XqBIJ7HRlETS - hSaRvTDq4HaDQape4z20LpdSp7UoG9Bm64/JWuBNUORXgRvwrF82P3ZSJ7yX6N/OEU4zdO2UZ50d - 58WO/WFckUMkoGhZy4aeVulEwSFzOmQO7pxkR6MC8VoCOZkUkbmGBkqUVTwmMWIWuO7f+o4Pzi+9 - YAb7Y5gSmIL/GyaEB5eytkUsOUMCJuW66w2LkGdUwDcKhAZiH6+IxhUy0MFHohexGSbQAvs3vszQ - RK6g2AQLFKSi57f9H+EcMQEXn1oazdMEwv9ruBn+AkKZuqpTBgAA + H4sIAAAAAAAAA41UTW/cIBS851dYPnfjZe1spFwTVZVyaFS1h7aqLAxERrFhw0fb1cr/vY9d28uC + EypZPjxmBt68gcNVluXEaiN7pnR+l/2EQpYdjn9YErhnUBW26z5MtY6LFwedQADT0ioSAqFOmTZc + YMOlGFVGkWFWszuKDaM1NoDIN2tUrda3qzX6im7uqhK+65vytkTbH/lMIYolKBXalgh5FCqbupfC + tGEznLpt77+Vj/LxS4M25cPT90/lfqv+VJ/7j+c9d60UYYN5q9izoxezg0VaCYwmLRam1gYb64zM + hVz12JD2vF3PDA4sZq8Ous4jB11ve4ZV2BqmVDEdTIpwsw+AMCcYKdssl1FcdgcPvQCRnYSFriaS + LiwSaYVRe381aqSxGs6hdb2UOq1F3WFtqrBN1mPeRUV+EbgB9vrl8uM69cJ7jv71HOG8ANeOedbF + YR7suD6MI/KIBCtat7Kjx1F6UfDInA6Fhzsl2dNosHipMTmalJC5hEZKlDU8JTFiFrj+bX3DB+9K + L5jB/hqmBKTg/5qJ4dGhnG0JS06QiEm53lnDEuQZFfGNwkJj4h6vhMYFMtKBR8KKVA8TaIH9G15m + 3CWOoNgEixSkoqe3/Z1wjpiIC08tTeZpAsH9Gq6Gf35I1iBTBgAA headers: content-encoding: [gzip] content-length: ['495'] @@ -137,21 +137,21 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA61U72vbMBD93r/C+MM+rYlkK+lcKCP9sa4LTViXMOgYRpZPrahje7LcNoT875MU - O7bTdHTQfDDk7nT37r3HrQ4cx41o+hBSxrIyVYV77PzSQcdZ2a9Oy6xUIr0L03IRgdR51/cwPiKf - Btj9WBfZHildgMn/GE2c69HsYuqc3VycX82c+eRqOmmKq1mhWua2nt0De9Ajmoq60ygRDJzLnjOW - EBVNPhHpg4Fag9QwWVmobLEBeDb3bsjtH3ozPr/NfuLLnN/B+Esktw12tg4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VLbyysr8EEI1s9AwFJAd6sfluqC+ + JFappIQG93gYvwxnUu3+MrxMVSL2WRoeSRrbi3U9e1T6EAKjfETjrJKeh5q5k1SZTlv1/a13skvC + TNiOaWbEd0rrZs4p4zal+RjzBZcXGL1LoygDeYEKTewEVrql9u+ORHsv7tsNMdPVFIyKGTsUKlIG + lgKeeZprhWtQZKpU0O+KZxEXb0eAotTYUDumdhqax61lRNSwDs2+aXi/xcOtU9QWYJv5+r/G8Xhl + 7/q9Kc/aAdT6Pas55ABoWbUtHdDEubtXrwRVFv/fxobMxj7OAcaTZG1trdrZ9i8rRFE8hgYAAA== headers: content-encoding: [gzip] content-length: ['625'] @@ -161,7 +161,7 @@ interactions: body: null headers: {} method: DELETE - uri: https://api.balancedpayments.com:443/bank_accounts/BA3dHpK9BMTGleJbwQyO9U2B + uri: https://api.balancedpayments.com:443/bank_accounts/BA4hixLak3IdlPJRaGtMXgB7 response: body: {string: !!python/unicode ''} headers: @@ -172,19 +172,19 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF response: body: string: !!binary | - H4sIAAAAAAAAA41UQW7bMBC85xWCznVkyS6a+JqiPeQWtCjgohBWJBMRkUiFpIoahv7epS3JNKmU - veiwOzPkzo54vEmSlPTayJYpne6Sn1hIkuPpiy0BLcOq6Jvmw1RruHi10AmEMC17RXwg1inThgsw - XIpRZRQZZrW+o2AYLcEgIi3W+Xa1/rRa59/yfLcpdkV+e/+x2Nzn+3SmEMUilLvNXVFsHAqVVdlK - YWp/GE7tsQ/fi6ft/g2eHj/v5Y/8a/f8wh6/VOpyZldL4Q+Y1oo9W3o2O5jFldBoUoMwpTZgemtk - KuSqBUPqy3EtM+BZzN4sdJ0GDtrZDgyUPxpQqpj2NkW4OXhA3BOulBXL5Tws24v7XqBIJ7HRlETS - hSaRvTDq4HaDQape4z20LpdSp7UoG9Bm64/JWuBNUORXgRvwrF82P3ZSJ7yX6N/OEU4zdO2UZ50d - 58WO/WFckUMkoGhZy4aeVulEwSFzOmQO7pxkR6MC8VoCOZkUkbmGBkqUVTwmMWIWuO7f+o4Pzi+9 - YAb7Y5gSmIL/GyaEB5eytkUsOUMCJuW66w2LkGdUwDcKhAZiH6+IxhUy0MFHohexGSbQAvs3vszQ - RK6g2AQLFKSi57f9H+EcMQEXn1oazdMEwv9ruBn+AkKZuqpTBgAA + H4sIAAAAAAAAA41UTW/cIBS851dYPnfjZe1spFwTVZVyaFS1h7aqLAxERrFhw0fb1cr/vY9d28uC + EypZPjxmBt68gcNVluXEaiN7pnR+l/2EQpYdjn9YErhnUBW26z5MtY6LFwedQADT0ioSAqFOmTZc + YMOlGFVGkWFWszuKDaM1NoDIN2tUrda3qzX6im7uqhK+65vytkTbH/lMIYolKBXalgh5FCqbupfC + tGEznLpt77+Vj/LxS4M25cPT90/lfqv+VJ/7j+c9d60UYYN5q9izoxezg0VaCYwmLRam1gYb64zM + hVz12JD2vF3PDA4sZq8Ous4jB11ve4ZV2BqmVDEdTIpwsw+AMCcYKdssl1FcdgcPvQCRnYSFriaS + LiwSaYVRe381aqSxGs6hdb2UOq1F3WFtqrBN1mPeRUV+EbgB9vrl8uM69cJ7jv71HOG8ANeOedbF + YR7suD6MI/KIBCtat7Kjx1F6UfDInA6Fhzsl2dNosHipMTmalJC5hEZKlDU8JTFiFrj+bX3DB+9K + L5jB/hqmBKTg/5qJ4dGhnG0JS06QiEm53lnDEuQZFfGNwkJj4h6vhMYFMtKBR8KKVA8TaIH9G15m + 3CWOoNgEixSkoqe3/Z1wjpiIC08tTeZpAsH9Gq6Gf35I1iBTBgAA headers: content-encoding: [gzip] content-length: ['495'] @@ -194,13 +194,13 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0 response: body: {string: !!python/unicode "{\n \"bank_accounts\": [],\n \"meta\": {\n - \ \"last\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0\",\n - \ \"next\": null,\n \"href\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0\",\n + \ \"last\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0\",\n + \ \"next\": null,\n \"href\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0\",\n \ \"limit\": 10,\n \"offset\": 0,\n \"previous\": null,\n \"total\": - 0,\n \"first\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0\"\n + 0,\n \"first\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0\"\n \ },\n \"links\": {}\n}"} headers: content-length: ['396'] @@ -210,13 +210,13 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0 response: body: {string: !!python/unicode "{\n \"bank_accounts\": [],\n \"meta\": {\n - \ \"last\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0\",\n - \ \"next\": null,\n \"href\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0\",\n + \ \"last\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0\",\n + \ \"next\": null,\n \"href\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0\",\n \ \"limit\": 10,\n \"offset\": 0,\n \"previous\": null,\n \"total\": - 0,\n \"first\": \"/customers/CU2R4ZqaRKDZoW1GpfgeKFbr/bank_accounts?limit=10&offset=0\"\n + 0,\n \"first\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0\"\n \ },\n \"links\": {}\n}"} headers: content-length: ['396'] diff --git a/tests/py/fixtures/TestBillingPayday.yml b/tests/py/fixtures/TestBillingPayday.yml deleted file mode 100644 index 09b174f739..0000000000 --- a/tests/py/fixtures/TestBillingPayday.yml +++ /dev/null @@ -1,148 +0,0 @@ -interactions: -- request: - body: null - headers: {} - method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr - response: - body: - string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIkp028NXtJbcU6aEtCmFNshURiXT4CGIY+vcubUmmSaXs - RYfdmSF3dsTjTZblxGojO6Z0vsl+YiHLjqcvtgR0DKvCtu2HsdZy8eygIwhhWlpFQiDWKdOGCzBc - ikFlEOknNbunYBitwSAir5blerH8tFiWT2W5WVWbqrpd35X398sf+UQhiiUoq2p993HlUajc1Z0U - pgmH4dQdu/1Wfd3yPw/bl8fP9PvjF/LUvK4e3tTlzH0jRThg3ij229GLycEirYRGkwaEqbUBY52R - uZCLDgxpLsd1zEBgMXtx0DKPHHSzHRiocDSgVDEdbIpwcwiAuCdcKavmy2VcdhcPvUCRvcRGWxNJ - Z5pEWmHUwe9Gg+ysxntoXc+lTmtRt6DNOhyTdcDbqMivAtfjWb9cftykXngv0b+dIpwX6Nopz7o4 - Tosd+v2wIo9IQNG6kS09rdKLgkfmtC883DnJnsYOxHMN5GRSQuYaGilRtuMpiQEzw/X/1nd88H7p - GTPYm2FKYAr+b5gYHl3K2Zaw5AyJmJTrvTUsQZ5QEd8oEBqIe7wSGlfISAcfCStSM4ygGfYrvszQ - Jq6g2AiLFKSi57f9H+EcMBEXn1qazNMIwv+rv+n/AoxtLhJTBgAA - headers: - content-encoding: [gzip] - content-length: ['495'] - content-type: [application/json] - status: {code: 200, message: OK} -- request: - body: null - headers: {} - method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/cards?limit=10&offset=0 - response: - body: - string: !!binary | - H4sIAAAAAAAAA6VVyW7bMBC95ysIHXpKbIlyvAFB4ThBigRx9gJNUQg0F5uITDok5dgI/O8lKcmS - sqBFy4MAzcKZefNm+LoHQICRIjoYgp/2B4BX/7XilIsnJy4FzjLTRi6ostJg/ABvx3x2Pn6+OSE/ - bk7x/XwVn69VUPhv98uLGBczqpaKC+Mc+7jHwg6M4+4hYv0+jmncxSyEvU6XYtTtMIJZ3CUEQxqx - eGDNKR6wmDESHiLY7QW7i/FqlSiqs9TdK7I03WlEtpjmaa5rJ7Kn8kYrnSylNihNFsjguctNyEpP - 10uukOFSJAspjNNH4S7CghrUBEfRmbX10EjBMu1+SnOHHTebxMgXb1FXIEJsETqBTnEs1wC+h5AT - f+8Y3p1dn0yujx9CeXUxRVQPzPO4VhNGhs6k2jhraeYWgl3CZrOkTowVJdw0QSzrb2A4ReIpEWjh - vc6vL69uz0YTMP42ujsFx6PJxT6YtEatJp7aKEpNheeG6spgqpDwdXznGlXibEls1iRBnh0wjDoH - Ye8gjO6jaBjDIYxb/X4fdgaPtVA5ZNa+Tk4LsJXUa8hZTB2yH4gjFy+CMbhEXIA7n3q9MZYaxhf/ - YT8L6mBJvM0ghFFY98YyE0ZtksLAxX83GRiJhNCpbccQGJXRir857I1+1Pi4ocjNIAxhRUg7DG/K - DLhOVlRxxqmDvRHAkX83OkFeOyiYCGybQF4ecNkDIoGQBniW1Brusi/YNAQMpbrKf64oc6i0/W5p - /wVxFf0DCWC/04l7j/lsbC2UvxxaQWMOgxRpz6J2uals7E/2VJ7a15QvuDmKwi+SMU3NUdnDQNB1 - c60EVVHFGvz3y31Um2i5UII8upUUDQ2Wiq64zNwCrlgQGGnXlfPLmRIwrv6/YAujX9ZvNn7+LrQI - 18vM2Dmu2vnqu9riZNveaYuEck39nai1ovArtdtiXIpAzjWZy9S/RSVzaqFq+kYwP0Cf+BQ6V+He - 9jfXVB+z7QYAAA== - headers: - content-encoding: [gzip] - content-length: ['751'] - content-type: [application/json] - status: {code: 200, message: OK} -- request: - body: '{"amount": 1000, "description": "janet"}' - headers: {} - method: POST - uri: https://api.balancedpayments.com:443/cards/CC2SGPDNPBU0oOKbaes9tqC1/debits - response: - body: {string: !!python/unicode "{\n \"debits\": [\n {\n \"status\": - \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"customer\": - \"CU2RCigJCqQDdYQEcThv3Jxr\",\n \"source\": \"CC2SGPDNPBU0oOKbaes9tqC1\",\n - \ \"order\": null,\n \"dispute\": null\n },\n \"updated_at\": - \"2014-07-01T11:33:17.139146Z\",\n \"created_at\": \"2014-07-01T11:33:16.424807Z\",\n - \ \"transaction_number\": \"W408-651-6074\",\n \"failure_reason\": - null,\n \"currency\": \"USD\",\n \"amount\": 1000,\n \"failure_reason_code\": - null,\n \"meta\": {},\n \"href\": \"/debits/WD3QtectdD2zCuJi6l0f8vjj\",\n - \ \"appears_on_statement_as\": \"BAL*example.com\",\n \"id\": \"WD3QtectdD2zCuJi6l0f8vjj\"\n - \ }\n ],\n \"links\": {\n \"debits.customer\": \"/customers/{debits.customer}\",\n - \ \"debits.dispute\": \"/disputes/{debits.dispute}\",\n \"debits.source\": - \"/resources/{debits.source}\",\n \"debits.order\": \"/orders/{debits.order}\",\n - \ \"debits.refunds\": \"/debits/{debits.id}/refunds\",\n \"debits.events\": - \"/debits/{debits.id}/events\"\n }\n}"} - headers: - content-length: ['1002'] - content-type: [application/json] - status: {code: 201, message: CREATED} -- request: - body: null - headers: {} - method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr - response: - body: - string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIkp028NXtJbcU6aEtCmFNshURiXT4CGIY+vcubUmmSaXs - RYfdmSF3dsTjTZblxGojO6Z0vsl+YiHLjqcvtgR0DKvCtu2HsdZy8eygIwhhWlpFQiDWKdOGCzBc - ikFlEOknNbunYBitwSAir5blerH8tFiWT2W5WVWbqrpd35X398sf+UQhiiUoq2p993HlUajc1Z0U - pgmH4dQdu/1Wfd3yPw/bl8fP9PvjF/LUvK4e3tTlzH0jRThg3ij229GLycEirYRGkwaEqbUBY52R - uZCLDgxpLsd1zEBgMXtx0DKPHHSzHRiocDSgVDEdbIpwcwiAuCdcKavmy2VcdhcPvUCRvcRGWxNJ - Z5pEWmHUwe9Gg+ysxntoXc+lTmtRt6DNOhyTdcDbqMivAtfjWb9cftykXngv0b+dIpwX6Nopz7o4 - Tosd+v2wIo9IQNG6kS09rdKLgkfmtC883DnJnsYOxHMN5GRSQuYaGilRtuMpiQEzw/X/1nd88H7p - GTPYm2FKYAr+b5gYHl3K2Zaw5AyJmJTrvTUsQZ5QEd8oEBqIe7wSGlfISAcfCStSM4ygGfYrvszQ - Jq6g2AiLFKSi57f9H+EcMBEXn1qazNMIwv+rv+n/AoxtLhJTBgAA - headers: - content-encoding: [gzip] - content-length: ['495'] - content-type: [application/json] - status: {code: 200, message: OK} -- request: - body: null - headers: {} - method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/cards?limit=10&offset=0 - response: - body: - string: !!binary | - H4sIAAAAAAAAA6VVyW7bMBC95ysIHXpKbIlyvAFB4ThBigRx9gJNUQg0F5uITDok5dgI/O8lKcmS - sqBFy4MAzcKZefNm+LoHQICRIjoYgp/2B4BX/7XilIsnJy4FzjLTRi6ostJg/ABvx3x2Pn6+OSE/ - bk7x/XwVn69VUPhv98uLGBczqpaKC+Mc+7jHwg6M4+4hYv0+jmncxSyEvU6XYtTtMIJZ3CUEQxqx - eGDNKR6wmDESHiLY7QW7i/FqlSiqs9TdK7I03WlEtpjmaa5rJ7Kn8kYrnSylNihNFsjguctNyEpP - 10uukOFSJAspjNNH4S7CghrUBEfRmbX10EjBMu1+SnOHHTebxMgXb1FXIEJsETqBTnEs1wC+h5AT - f+8Y3p1dn0yujx9CeXUxRVQPzPO4VhNGhs6k2jhraeYWgl3CZrOkTowVJdw0QSzrb2A4ReIpEWjh - vc6vL69uz0YTMP42ujsFx6PJxT6YtEatJp7aKEpNheeG6spgqpDwdXznGlXibEls1iRBnh0wjDoH - Ye8gjO6jaBjDIYxb/X4fdgaPtVA5ZNa+Tk4LsJXUa8hZTB2yH4gjFy+CMbhEXIA7n3q9MZYaxhf/ - YT8L6mBJvM0ghFFY98YyE0ZtksLAxX83GRiJhNCpbccQGJXRir857I1+1Pi4ocjNIAxhRUg7DG/K - DLhOVlRxxqmDvRHAkX83OkFeOyiYCGybQF4ecNkDIoGQBniW1Brusi/YNAQMpbrKf64oc6i0/W5p - /wVxFf0DCWC/04l7j/lsbC2UvxxaQWMOgxRpz6J2uals7E/2VJ7a15QvuDmKwi+SMU3NUdnDQNB1 - c60EVVHFGvz3y31Um2i5UII8upUUDQ2Wiq64zNwCrlgQGGnXlfPLmRIwrv6/YAujX9ZvNn7+LrQI - 18vM2Dmu2vnqu9riZNveaYuEck39nai1ovArtdtiXIpAzjWZy9S/RSVzaqFq+kYwP0Cf+BQ6V+He - 9jfXVB+z7QYAAA== - headers: - content-encoding: [gzip] - content-length: ['751'] - content-type: [application/json] - status: {code: 200, message: OK} -- request: - body: '{"amount": 1000, "description": "janet"}' - headers: {} - method: POST - uri: https://api.balancedpayments.com:443/cards/CC2SGPDNPBU0oOKbaes9tqC1/debits - response: - body: {string: !!python/unicode "{\n \"debits\": [\n {\n \"status\": - \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"customer\": - \"CU2RCigJCqQDdYQEcThv3Jxr\",\n \"source\": \"CC2SGPDNPBU0oOKbaes9tqC1\",\n - \ \"order\": null,\n \"dispute\": null\n },\n \"updated_at\": - \"2014-07-01T11:33:19.183741Z\",\n \"created_at\": \"2014-07-01T11:33:18.328686Z\",\n - \ \"transaction_number\": \"W826-691-7336\",\n \"failure_reason\": - null,\n \"currency\": \"USD\",\n \"amount\": 1000,\n \"failure_reason_code\": - null,\n \"meta\": {},\n \"href\": \"/debits/WD3SBmZ5oKPKtu9X2gMD9Y0J\",\n - \ \"appears_on_statement_as\": \"BAL*example.com\",\n \"id\": \"WD3SBmZ5oKPKtu9X2gMD9Y0J\"\n - \ }\n ],\n \"links\": {\n \"debits.customer\": \"/customers/{debits.customer}\",\n - \ \"debits.dispute\": \"/disputes/{debits.dispute}\",\n \"debits.source\": - \"/resources/{debits.source}\",\n \"debits.order\": \"/orders/{debits.order}\",\n - \ \"debits.refunds\": \"/debits/{debits.id}/refunds\",\n \"debits.events\": - \"/debits/{debits.id}/events\"\n }\n}"} - headers: - content-length: ['1002'] - content-type: [application/json] - status: {code: 201, message: CREATED} -version: 1 diff --git a/tests/py/fixtures/TestCardHolds.yml b/tests/py/fixtures/TestCardHolds.yml new file mode 100644 index 0000000000..e73092f836 --- /dev/null +++ b/tests/py/fixtures/TestCardHolds.yml @@ -0,0 +1,862 @@ +interactions: +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA6VVW2+bMBR+76+weNhTmwBOyEWqprSbVq1NWq1dO3WakIPtxiqxmW2yoCr/fbaB + AL1o08YDEud+vvOdw9MBAF6CJFbeFHw3HwA8ubcRp4w/WnEtsJa50mJNpJF6p1/h+TdcbBbXH0hx + cQWz2Z2crH5ir/LfHdaBKOMPRGaScW0dx8mI+oMQwmiI6HicQAKjhPrhaBCRBEUDihMKI4yTkAQU + Tow5SSYUUor9IQqjkbcPnGw2sSQqT21cnqfpXsPz9bIsc9t6AvM03mij4kwojdJ4jXSysrVx0ejJ + NmMSaSZ4vBZcW33g7zOsiUZdcCR5MLYOGsFpruxHbW6xY7qItfjlLNoKhLFpQsWhVZyILQhfQsiw + i3sK52cn6i7anKELqPKLW3xzu7yctBBBmjwIWVhroVcGgn3BusiIFSeSYKa7INb9dzBcIv4Yc7R2 + Xp+v5pdfPs0W4PRsdv0RnMwW54dg0Zv1ungqLQnRDZ4FUY3BUiLu+rhlCjXiPMOmahwjx47QDwZH + /ujID26C4XQAp4NhbzwMQhjct1KVkBn7NjkNwEbS7qFkMbHIviIObD4TGcwR4+Dald4ejKGGds2/ + Os+KOonAzmbih4Hf9k5EzrUs4srA5n+xGQniMSZLM44p0DInDX9L2DvzaPGxIMjuYOiHDSHNMjxr + 02Mq3hDJKCMW9k4CS/796nhl76BiIjBjAmV7wFYPsABcaOBY0hq4rb5i0xRQlKqm/pUk1KLSd7el + /xfEleQPJBhEcBLA+3I3dgbKHxYtr7OHXoqUY1G/vlQm9xt3qiztfcrWTB8H/jtBqSL6uJ6hx8m2 + e1a8pqnqDP57cJfVFFofFK/MbiTVQL1Mkg0TuT3ADQs8Lcy5sn4lUzzK5P83bGB0x/rZxS//Cz3M + VJZrs8fNOJ/cVHsM7/p7bVVQqWn/J1qjqPxq7a5alyqRdY1XInX/opo5rVQtfSeZW6A3fCqd7fBg + 9xv4QHhu7QYAAA== + headers: + content-encoding: [gzip] + content-length: ['751'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"amount": 2091, "meta": {"state": "new", "participant_id": 2}, "description": + "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/cards/CC3MHBsW6vHaL3suLVdTVbO9/card_holds + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": null\n },\n \"updated_at\": + \"2014-08-06T16:10:31.247252Z\",\n \"created_at\": \"2014-08-06T16:10:30.903504Z\",\n + \ \"transaction_number\": \"HL645-330-0776\",\n \"expires_at\": \"2014-08-13T16:10:31.135263Z\",\n + \ \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": + 2091,\n \"meta\": {\n \"state\": \"new\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/card_holds/HL1sTnLxawUR168Ucdth56zH\",\n + \ \"failure_reason_code\": null,\n \"voided_at\": null,\n \"id\": + \"HL1sTnLxawUR168Ucdth56zH\"\n }\n ],\n \"links\": {\n \"card_holds.events\": + \"/card_holds/{card_holds.id}/events\",\n \"card_holds.card\": \"/cards/{card_holds.card}\",\n + \ \"card_holds.debits\": \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": + \"/debits/{card_holds.debit}\"\n }\n}"} + headers: + content-length: ['944'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"amount": 1000, "meta": {"exchange_id": 1, "participant_id": 2}, "description": + "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/card_holds/HL1sTnLxawUR168Ucdth56zH/debits + response: + body: {string: !!python/unicode "{\n \"debits\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"customer\": + \"CU3KXdyvNSDeyLP3pAWr9hqd\",\n \"source\": \"CC3MHBsW6vHaL3suLVdTVbO9\",\n + \ \"order\": null,\n \"dispute\": null\n },\n \"updated_at\": + \"2014-08-06T16:10:32.094369Z\",\n \"created_at\": \"2014-08-06T16:10:31.653991Z\",\n + \ \"transaction_number\": \"W530-573-0663\",\n \"failure_reason\": + null,\n \"currency\": \"USD\",\n \"amount\": 1000,\n \"failure_reason_code\": + null,\n \"meta\": {\n \"exchange_id\": \"1\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/debits/WD1tJAtTmE3J2iFFK32qNVjL\",\n \"appears_on_statement_as\": + \"BAL*example.com\",\n \"id\": \"WD1tJAtTmE3J2iFFK32qNVjL\"\n }\n + \ ],\n \"links\": {\n \"debits.customer\": \"/customers/{debits.customer}\",\n + \ \"debits.dispute\": \"/disputes/{debits.dispute}\",\n \"debits.source\": + \"/resources/{debits.source}\",\n \"debits.order\": \"/orders/{debits.order}\",\n + \ \"debits.refunds\": \"/debits/{debits.id}/refunds\",\n \"debits.events\": + \"/debits/{debits.id}/events\"\n }\n}"} + headers: + content-length: ['1067'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"status": "succeeded", "description": "janet", "amount": 2091, "created_at": + "2014-08-06T16:10:30.903504Z", "card_href": "/cards/CC3MHBsW6vHaL3suLVdTVbO9", + "updated_at": "2014-08-06T16:10:31.247252Z", "expires_at": "2014-08-13T16:10:31.135263Z", + "failure_reason": null, "currency": "USD", "transaction_number": "HL645-330-0776", + "meta": {"state": "captured", "participant_id": "2"}, "debit": null, "failure_reason_code": + null, "voided_at": null, "id": "HL1sTnLxawUR168Ucdth56zH"}' + headers: {} + method: PUT + uri: https://api.balancedpayments.com:443/card_holds/HL1sTnLxawUR168Ucdth56zH + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": \"WD1tJAtTmE3J2iFFK32qNVjL\"\n + \ },\n \"updated_at\": \"2014-08-06T16:10:32.534385Z\",\n \"created_at\": + \"2014-08-06T16:10:30.903504Z\",\n \"transaction_number\": \"HL645-330-0776\",\n + \ \"expires_at\": \"2014-08-13T16:10:31.135263Z\",\n \"failure_reason\": + null,\n \"currency\": \"USD\",\n \"amount\": 2091,\n \"meta\": + {\n \"state\": \"captured\",\n \"participant_id\": \"2\"\n },\n + \ \"href\": \"/card_holds/HL1sTnLxawUR168Ucdth56zH\",\n \"failure_reason_code\": + null,\n \"voided_at\": null,\n \"id\": \"HL1sTnLxawUR168Ucdth56zH\"\n + \ }\n ],\n \"links\": {\n \"card_holds.events\": \"/card_holds/{card_holds.id}/events\",\n + \ \"card_holds.card\": \"/cards/{card_holds.card}\",\n \"card_holds.debits\": + \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": \"/debits/{card_holds.debit}\"\n + \ }\n}"} + headers: + content-length: ['971'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA6VVW2+bMBR+76+weNhTmwBOyEWqprSbVq1NWq1dO3WakIPtxiqxmW2yoCr/fbaB + AL1o08YDEud+vvOdw9MBAF6CJFbeFHw3HwA8ubcRp4w/WnEtsJa50mJNpJF6p1/h+TdcbBbXH0hx + cQWz2Z2crH5ir/LfHdaBKOMPRGaScW0dx8mI+oMQwmiI6HicQAKjhPrhaBCRBEUDihMKI4yTkAQU + Tow5SSYUUor9IQqjkbcPnGw2sSQqT21cnqfpXsPz9bIsc9t6AvM03mij4kwojdJ4jXSysrVx0ejJ + NmMSaSZ4vBZcW33g7zOsiUZdcCR5MLYOGsFpruxHbW6xY7qItfjlLNoKhLFpQsWhVZyILQhfQsiw + i3sK52cn6i7anKELqPKLW3xzu7yctBBBmjwIWVhroVcGgn3BusiIFSeSYKa7INb9dzBcIv4Yc7R2 + Xp+v5pdfPs0W4PRsdv0RnMwW54dg0Zv1ungqLQnRDZ4FUY3BUiLu+rhlCjXiPMOmahwjx47QDwZH + /ujID26C4XQAp4NhbzwMQhjct1KVkBn7NjkNwEbS7qFkMbHIviIObD4TGcwR4+Dald4ejKGGds2/ + Os+KOonAzmbih4Hf9k5EzrUs4srA5n+xGQniMSZLM44p0DInDX9L2DvzaPGxIMjuYOiHDSHNMjxr + 02Mq3hDJKCMW9k4CS/796nhl76BiIjBjAmV7wFYPsABcaOBY0hq4rb5i0xRQlKqm/pUk1KLSd7el + /xfEleQPJBhEcBLA+3I3dgbKHxYtr7OHXoqUY1G/vlQm9xt3qiztfcrWTB8H/jtBqSL6uJ6hx8m2 + e1a8pqnqDP57cJfVFFofFK/MbiTVQL1Mkg0TuT3ADQs8Lcy5sn4lUzzK5P83bGB0x/rZxS//Cz3M + VJZrs8fNOJ/cVHsM7/p7bVVQqWn/J1qjqPxq7a5alyqRdY1XInX/opo5rVQtfSeZW6A3fCqd7fBg + 9xv4QHhu7QYAAA== + headers: + content-encoding: [gzip] + content-length: ['751'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"amount": 2091, "meta": {"state": "new", "participant_id": 2}, "description": + "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/cards/CC3MHBsW6vHaL3suLVdTVbO9/card_holds + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": null\n },\n \"updated_at\": + \"2014-08-06T16:10:33.479111Z\",\n \"created_at\": \"2014-08-06T16:10:33.257372Z\",\n + \ \"transaction_number\": \"HL744-952-5009\",\n \"expires_at\": \"2014-08-13T16:10:33.392359Z\",\n + \ \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": + 2091,\n \"meta\": {\n \"state\": \"new\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/card_holds/HL1vxwGqvZFvkpjdSyBB74SF\",\n + \ \"failure_reason_code\": null,\n \"voided_at\": null,\n \"id\": + \"HL1vxwGqvZFvkpjdSyBB74SF\"\n }\n ],\n \"links\": {\n \"card_holds.events\": + \"/card_holds/{card_holds.id}/events\",\n \"card_holds.card\": \"/cards/{card_holds.card}\",\n + \ \"card_holds.debits\": \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": + \"/debits/{card_holds.debit}\"\n }\n}"} + headers: + content-length: ['944'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"amount": 2091, "meta": {"exchange_id": 2, "participant_id": 2}, "description": + "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/card_holds/HL1vxwGqvZFvkpjdSyBB74SF/debits + response: + body: {string: !!python/unicode "{\n \"debits\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"customer\": + \"CU3KXdyvNSDeyLP3pAWr9hqd\",\n \"source\": \"CC3MHBsW6vHaL3suLVdTVbO9\",\n + \ \"order\": null,\n \"dispute\": null\n },\n \"updated_at\": + \"2014-08-06T16:10:34.625458Z\",\n \"created_at\": \"2014-08-06T16:10:34.219263Z\",\n + \ \"transaction_number\": \"W452-602-8336\",\n \"failure_reason\": + null,\n \"currency\": \"USD\",\n \"amount\": 2091,\n \"failure_reason_code\": + null,\n \"meta\": {\n \"exchange_id\": \"2\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/debits/WD1wCGE8xvdpujzu33oQ0Iuc\",\n \"appears_on_statement_as\": + \"BAL*example.com\",\n \"id\": \"WD1wCGE8xvdpujzu33oQ0Iuc\"\n }\n + \ ],\n \"links\": {\n \"debits.customer\": \"/customers/{debits.customer}\",\n + \ \"debits.dispute\": \"/disputes/{debits.dispute}\",\n \"debits.source\": + \"/resources/{debits.source}\",\n \"debits.order\": \"/orders/{debits.order}\",\n + \ \"debits.refunds\": \"/debits/{debits.id}/refunds\",\n \"debits.events\": + \"/debits/{debits.id}/events\"\n }\n}"} + headers: + content-length: ['1067'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"status": "succeeded", "description": "janet", "amount": 2091, "created_at": + "2014-08-06T16:10:33.257372Z", "card_href": "/cards/CC3MHBsW6vHaL3suLVdTVbO9", + "updated_at": "2014-08-06T16:10:33.479111Z", "expires_at": "2014-08-13T16:10:33.392359Z", + "failure_reason": null, "currency": "USD", "transaction_number": "HL744-952-5009", + "meta": {"state": "captured", "participant_id": "2"}, "debit": null, "failure_reason_code": + null, "voided_at": null, "id": "HL1vxwGqvZFvkpjdSyBB74SF"}' + headers: {} + method: PUT + uri: https://api.balancedpayments.com:443/card_holds/HL1vxwGqvZFvkpjdSyBB74SF + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": \"WD1wCGE8xvdpujzu33oQ0Iuc\"\n + \ },\n \"updated_at\": \"2014-08-06T16:10:35.009812Z\",\n \"created_at\": + \"2014-08-06T16:10:33.257372Z\",\n \"transaction_number\": \"HL744-952-5009\",\n + \ \"expires_at\": \"2014-08-13T16:10:33.392359Z\",\n \"failure_reason\": + null,\n \"currency\": \"USD\",\n \"amount\": 2091,\n \"meta\": + {\n \"state\": \"captured\",\n \"participant_id\": \"2\"\n },\n + \ \"href\": \"/card_holds/HL1vxwGqvZFvkpjdSyBB74SF\",\n \"failure_reason_code\": + null,\n \"voided_at\": null,\n \"id\": \"HL1vxwGqvZFvkpjdSyBB74SF\"\n + \ }\n ],\n \"links\": {\n \"card_holds.events\": \"/card_holds/{card_holds.id}/events\",\n + \ \"card_holds.card\": \"/cards/{card_holds.card}\",\n \"card_holds.debits\": + \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": \"/debits/{card_holds.debit}\"\n + \ }\n}"} + headers: + content-length: ['971'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA6VVW2+bMBR+76+weNhTmwBOyEWqprSbVq1NWq1dO3WakIPtxiqxmW2yoCr/fbaB + AL1o08YDEud+vvOdw9MBAF6CJFbeFHw3HwA8ubcRp4w/WnEtsJa50mJNpJF6p1/h+TdcbBbXH0hx + cQWz2Z2crH5ir/LfHdaBKOMPRGaScW0dx8mI+oMQwmiI6HicQAKjhPrhaBCRBEUDihMKI4yTkAQU + Tow5SSYUUor9IQqjkbcPnGw2sSQqT21cnqfpXsPz9bIsc9t6AvM03mij4kwojdJ4jXSysrVx0ejJ + NmMSaSZ4vBZcW33g7zOsiUZdcCR5MLYOGsFpruxHbW6xY7qItfjlLNoKhLFpQsWhVZyILQhfQsiw + i3sK52cn6i7anKELqPKLW3xzu7yctBBBmjwIWVhroVcGgn3BusiIFSeSYKa7INb9dzBcIv4Yc7R2 + Xp+v5pdfPs0W4PRsdv0RnMwW54dg0Zv1ungqLQnRDZ4FUY3BUiLu+rhlCjXiPMOmahwjx47QDwZH + /ujID26C4XQAp4NhbzwMQhjct1KVkBn7NjkNwEbS7qFkMbHIviIObD4TGcwR4+Dald4ejKGGds2/ + Os+KOonAzmbih4Hf9k5EzrUs4srA5n+xGQniMSZLM44p0DInDX9L2DvzaPGxIMjuYOiHDSHNMjxr + 02Mq3hDJKCMW9k4CS/796nhl76BiIjBjAmV7wFYPsABcaOBY0hq4rb5i0xRQlKqm/pUk1KLSd7el + /xfEleQPJBhEcBLA+3I3dgbKHxYtr7OHXoqUY1G/vlQm9xt3qiztfcrWTB8H/jtBqSL6uJ6hx8m2 + e1a8pqnqDP57cJfVFFofFK/MbiTVQL1Mkg0TuT3ADQs8Lcy5sn4lUzzK5P83bGB0x/rZxS//Cz3M + VJZrs8fNOJ/cVHsM7/p7bVVQqWn/J1qjqPxq7a5alyqRdY1XInX/opo5rVQtfSeZW6A3fCqd7fBg + 9xv4QHhu7QYAAA== + headers: + content-encoding: [gzip] + content-length: ['751'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"amount": 2091, "meta": {"state": "new", "participant_id": 2}, "description": + "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/cards/CC3MHBsW6vHaL3suLVdTVbO9/card_holds + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": null\n },\n \"updated_at\": + \"2014-08-06T16:10:36.017293Z\",\n \"created_at\": \"2014-08-06T16:10:35.807447Z\",\n + \ \"transaction_number\": \"HL893-713-2609\",\n \"expires_at\": \"2014-08-13T16:10:35.934417Z\",\n + \ \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": + 2091,\n \"meta\": {\n \"state\": \"new\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/card_holds/HL1yplLIcgwLVUWkXXK5D96l\",\n + \ \"failure_reason_code\": null,\n \"voided_at\": null,\n \"id\": + \"HL1yplLIcgwLVUWkXXK5D96l\"\n }\n ],\n \"links\": {\n \"card_holds.events\": + \"/card_holds/{card_holds.id}/events\",\n \"card_holds.card\": \"/cards/{card_holds.card}\",\n + \ \"card_holds.debits\": \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": + \"/debits/{card_holds.debit}\"\n }\n}"} + headers: + content-length: ['944'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"amount": 1576, "meta": {"exchange_id": 3, "participant_id": 2}, "description": + "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/card_holds/HL1yplLIcgwLVUWkXXK5D96l/debits + response: + body: {string: !!python/unicode "{\n \"debits\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"customer\": + \"CU3KXdyvNSDeyLP3pAWr9hqd\",\n \"source\": \"CC3MHBsW6vHaL3suLVdTVbO9\",\n + \ \"order\": null,\n \"dispute\": null\n },\n \"updated_at\": + \"2014-08-06T16:10:37.174940Z\",\n \"created_at\": \"2014-08-06T16:10:36.767099Z\",\n + \ \"transaction_number\": \"W550-194-1344\",\n \"failure_reason\": + null,\n \"currency\": \"USD\",\n \"amount\": 1576,\n \"failure_reason_code\": + null,\n \"meta\": {\n \"exchange_id\": \"3\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/debits/WD1zuksSljYxGxbMMHmaFpw4\",\n \"appears_on_statement_as\": + \"BAL*example.com\",\n \"id\": \"WD1zuksSljYxGxbMMHmaFpw4\"\n }\n + \ ],\n \"links\": {\n \"debits.customer\": \"/customers/{debits.customer}\",\n + \ \"debits.dispute\": \"/disputes/{debits.dispute}\",\n \"debits.source\": + \"/resources/{debits.source}\",\n \"debits.order\": \"/orders/{debits.order}\",\n + \ \"debits.refunds\": \"/debits/{debits.id}/refunds\",\n \"debits.events\": + \"/debits/{debits.id}/events\"\n }\n}"} + headers: + content-length: ['1067'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"status": "succeeded", "description": "janet", "amount": 2091, "created_at": + "2014-08-06T16:10:35.807447Z", "card_href": "/cards/CC3MHBsW6vHaL3suLVdTVbO9", + "updated_at": "2014-08-06T16:10:36.017293Z", "expires_at": "2014-08-13T16:10:35.934417Z", + "failure_reason": null, "currency": "USD", "transaction_number": "HL893-713-2609", + "meta": {"state": "captured", "participant_id": "2"}, "debit": null, "failure_reason_code": + null, "voided_at": null, "id": "HL1yplLIcgwLVUWkXXK5D96l"}' + headers: {} + method: PUT + uri: https://api.balancedpayments.com:443/card_holds/HL1yplLIcgwLVUWkXXK5D96l + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": \"WD1zuksSljYxGxbMMHmaFpw4\"\n + \ },\n \"updated_at\": \"2014-08-06T16:10:37.710099Z\",\n \"created_at\": + \"2014-08-06T16:10:35.807447Z\",\n \"transaction_number\": \"HL893-713-2609\",\n + \ \"expires_at\": \"2014-08-13T16:10:35.934417Z\",\n \"failure_reason\": + null,\n \"currency\": \"USD\",\n \"amount\": 2091,\n \"meta\": + {\n \"state\": \"captured\",\n \"participant_id\": \"2\"\n },\n + \ \"href\": \"/card_holds/HL1yplLIcgwLVUWkXXK5D96l\",\n \"failure_reason_code\": + null,\n \"voided_at\": null,\n \"id\": \"HL1yplLIcgwLVUWkXXK5D96l\"\n + \ }\n ],\n \"links\": {\n \"card_holds.events\": \"/card_holds/{card_holds.id}/events\",\n + \ \"card_holds.card\": \"/cards/{card_holds.card}\",\n \"card_holds.debits\": + \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": \"/debits/{card_holds.debit}\"\n + \ }\n}"} + headers: + content-length: ['971'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA6VVW2+bMBR+76+weNhTmwBOyEWqprSbVq1NWq1dO3WakIPtxiqxmW2yoCr/fbaB + AL1o08YDEud+vvOdw9MBAF6CJFbeFHw3HwA8ubcRp4w/WnEtsJa50mJNpJF6p1/h+TdcbBbXH0hx + cQWz2Z2crH5ir/LfHdaBKOMPRGaScW0dx8mI+oMQwmiI6HicQAKjhPrhaBCRBEUDihMKI4yTkAQU + Tow5SSYUUor9IQqjkbcPnGw2sSQqT21cnqfpXsPz9bIsc9t6AvM03mij4kwojdJ4jXSysrVx0ejJ + NmMSaSZ4vBZcW33g7zOsiUZdcCR5MLYOGsFpruxHbW6xY7qItfjlLNoKhLFpQsWhVZyILQhfQsiw + i3sK52cn6i7anKELqPKLW3xzu7yctBBBmjwIWVhroVcGgn3BusiIFSeSYKa7INb9dzBcIv4Yc7R2 + Xp+v5pdfPs0W4PRsdv0RnMwW54dg0Zv1ungqLQnRDZ4FUY3BUiLu+rhlCjXiPMOmahwjx47QDwZH + /ujID26C4XQAp4NhbzwMQhjct1KVkBn7NjkNwEbS7qFkMbHIviIObD4TGcwR4+Dald4ejKGGds2/ + Os+KOonAzmbih4Hf9k5EzrUs4srA5n+xGQniMSZLM44p0DInDX9L2DvzaPGxIMjuYOiHDSHNMjxr + 02Mq3hDJKCMW9k4CS/796nhl76BiIjBjAmV7wFYPsABcaOBY0hq4rb5i0xRQlKqm/pUk1KLSd7el + /xfEleQPJBhEcBLA+3I3dgbKHxYtr7OHXoqUY1G/vlQm9xt3qiztfcrWTB8H/jtBqSL6uJ6hx8m2 + e1a8pqnqDP57cJfVFFofFK/MbiTVQL1Mkg0TuT3ADQs8Lcy5sn4lUzzK5P83bGB0x/rZxS//Cz3M + VJZrs8fNOJ/cVHsM7/p7bVVQqWn/J1qjqPxq7a5alyqRdY1XInX/opo5rVQtfSeZW6A3fCqd7fBg + 9xv4QHhu7QYAAA== + headers: + content-encoding: [gzip] + content-length: ['751'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"amount": 2091, "meta": {"state": "new", "participant_id": 2}, "description": + "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/cards/CC3MHBsW6vHaL3suLVdTVbO9/card_holds + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": null\n },\n \"updated_at\": + \"2014-08-06T16:10:38.643314Z\",\n \"created_at\": \"2014-08-06T16:10:38.441152Z\",\n + \ \"transaction_number\": \"HL139-329-1699\",\n \"expires_at\": \"2014-08-13T16:10:38.557152Z\",\n + \ \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": + 2091,\n \"meta\": {\n \"state\": \"new\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/card_holds/HL1BndAv7I2I7BPg7Tl25oqY\",\n + \ \"failure_reason_code\": null,\n \"voided_at\": null,\n \"id\": + \"HL1BndAv7I2I7BPg7Tl25oqY\"\n }\n ],\n \"links\": {\n \"card_holds.events\": + \"/card_holds/{card_holds.id}/events\",\n \"card_holds.card\": \"/cards/{card_holds.card}\",\n + \ \"card_holds.debits\": \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": + \"/debits/{card_holds.debit}\"\n }\n}"} + headers: + content-length: ['944'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"amount": 2092, "meta": {"exchange_id": 4, "participant_id": 2}, "description": + "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/card_holds/HL1BndAv7I2I7BPg7Tl25oqY/debits + response: + body: {string: !!python/unicode "{\n \"errors\": [\n {\n \"status\": + \"Bad Request\",\n \"category_code\": \"request\",\n \"additional\": + null,\n \"status_code\": 400,\n \"category_type\": \"request\",\n + \ \"extras\": {\n \"amount\": \"\\\"2092\\\" must be <= 2091\"\n + \ },\n \"request_id\": \"OHM35123eac1d8411e4aecc02b12035401b\",\n + \ \"description\": \"Invalid field [amount] - \\\"2092\\\" must be <= + 2091 Your request id is OHM35123eac1d8411e4aecc02b12035401b.\"\n }\n ]\n}"} + headers: + content-length: ['444'] + content-type: [application/json] + status: {code: 400, message: BAD REQUEST} +- request: + body: '{"status": "succeeded", "transaction_number": "HL139-329-1699", "description": + "janet", "amount": 2091, "created_at": "2014-08-06T16:10:38.441152Z", "card_href": + "/cards/CC3MHBsW6vHaL3suLVdTVbO9", "updated_at": "2014-08-06T16:10:38.643314Z", + "expires_at": "2014-08-13T16:10:38.557152Z", "failure_reason": null, "currency": + "USD", "is_void": true, "meta": {"state": "cancelled", "participant_id": "2"}, + "debit": null, "failure_reason_code": null, "voided_at": null, "id": "HL1BndAv7I2I7BPg7Tl25oqY"}' + headers: {} + method: PUT + uri: https://api.balancedpayments.com:443/card_holds/HL1BndAv7I2I7BPg7Tl25oqY + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": null\n },\n \"updated_at\": + \"2014-08-06T16:10:39.911789Z\",\n \"created_at\": \"2014-08-06T16:10:38.441152Z\",\n + \ \"transaction_number\": \"HL139-329-1699\",\n \"expires_at\": \"2014-08-13T16:10:38.557152Z\",\n + \ \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": + 2091,\n \"meta\": {\n \"state\": \"cancelled\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/card_holds/HL1BndAv7I2I7BPg7Tl25oqY\",\n + \ \"failure_reason_code\": null,\n \"voided_at\": \"2014-08-06T16:10:39.911791Z\",\n + \ \"id\": \"HL1BndAv7I2I7BPg7Tl25oqY\"\n }\n ],\n \"links\": {\n + \ \"card_holds.events\": \"/card_holds/{card_holds.id}/events\",\n \"card_holds.card\": + \"/cards/{card_holds.card}\",\n \"card_holds.debits\": \"/card_holds/{card_holds.id}/debits\",\n + \ \"card_holds.debit\": \"/debits/{card_holds.debit}\"\n }\n}"} + headers: + content-length: ['975'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"meta": {"seq": 4}}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/customers + response: + body: {string: !!python/unicode "{\n \"customers\": [\n {\n \"name\": + null,\n \"links\": {\n \"source\": null,\n \"destination\": + null\n },\n \"updated_at\": \"2014-08-06T16:10:40.816863Z\",\n \"created_at\": + \"2014-08-06T16:10:40.687848Z\",\n \"dob_month\": null,\n \"id\": + \"CU1DTFMftE4lvobMCsSFSonP\",\n \"phone\": null,\n \"href\": \"/customers/CU1DTFMftE4lvobMCsSFSonP\",\n + \ \"merchant_status\": \"no-match\",\n \"meta\": {\n \"seq\": + \"4\"\n },\n \"dob_year\": null,\n \"address\": {\n \"city\": + null,\n \"line2\": null,\n \"line1\": null,\n \"state\": + null,\n \"postal_code\": null,\n \"country_code\": null\n },\n + \ \"business_name\": null,\n \"ssn_last4\": null,\n \"email\": + null,\n \"ein\": null\n }\n ],\n \"links\": {\n \"customers.source\": + \"/resources/{customers.source}\",\n \"customers.card_holds\": \"/customers/{customers.id}/card_holds\",\n + \ \"customers.bank_accounts\": \"/customers/{customers.id}/bank_accounts\",\n + \ \"customers.debits\": \"/customers/{customers.id}/debits\",\n \"customers.destination\": + \"/resources/{customers.destination}\",\n \"customers.external_accounts\": + \"/customers/{customers.id}/external_accounts\",\n \"customers.cards\": + \"/customers/{customers.id}/cards\",\n \"customers.disputes\": \"/customers/{customers.id}/disputes\",\n + \ \"customers.transactions\": \"/customers/{customers.id}/transactions\",\n + \ \"customers.refunds\": \"/customers/{customers.id}/refunds\",\n \"customers.reversals\": + \"/customers/{customers.id}/reversals\",\n \"customers.orders\": \"/customers/{customers.id}/orders\",\n + \ \"customers.credits\": \"/customers/{customers.id}/credits\"\n }\n}"} + headers: + content-length: ['1619'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"expiration_month": 12, "number": "4444444444444448", "expiration_year": + 2020}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/cards + response: + body: {string: !!python/unicode "{\n \"cards\": [\n {\n \"links\": {\n + \ \"customer\": null\n },\n \"fingerprint\": \"9ea2b317b53183f5a93ba23a594a0b8a0f2183ea9cc338e0964755cd9df71b99\",\n + \ \"cvv_result\": null,\n \"number\": \"xxxxxxxxxxxx4448\",\n \"avs_postal_match\": + null,\n \"expiration_month\": 12,\n \"meta\": {},\n \"id\": + \"CC1EVcqDEt16H3uaDsjp7kqN\",\n \"category\": \"other\",\n \"type\": + \"credit\",\n \"cvv_match\": null,\n \"bank_name\": \"CREDIT AGRICOLE + BANK POLSKA, S.A.\",\n \"avs_street_match\": null,\n \"brand\": + \"Visa\",\n \"updated_at\": \"2014-08-06T16:10:41.600581Z\",\n \"address\": + {\n \"city\": null,\n \"line2\": null,\n \"line1\": null,\n + \ \"state\": null,\n \"postal_code\": null,\n \"country_code\": + null\n },\n \"can_debit\": true,\n \"name\": null,\n \"expiration_year\": + 2020,\n \"cvv\": null,\n \"is_verified\": true,\n \"avs_result\": + null,\n \"can_credit\": false,\n \"href\": \"/cards/CC1EVcqDEt16H3uaDsjp7kqN\",\n + \ \"created_at\": \"2014-08-06T16:10:41.600578Z\"\n }\n ],\n \"links\": + {\n \"cards.card_holds\": \"/cards/{cards.id}/card_holds\",\n \"cards.customer\": + \"/customers/{cards.customer}\",\n \"cards.disputes\": \"/cards/{cards.id}/disputes\",\n + \ \"cards.debits\": \"/cards/{cards.id}/debits\"\n }\n}"} + headers: + access-control-allow-headers: [Content-Type] + access-control-allow-methods: ['POST, OPTIONS'] + access-control-allow-origin: ['*'] + content-length: ['1269'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"links": {"customer": "/customers/CU1DTFMftE4lvobMCsSFSonP"}, "cvv_result": + null, "number": "xxxxxxxxxxxx4448", "avs_postal_match": null, "expiration_month": + 12, "meta": {}, "id": "CC1EVcqDEt16H3uaDsjp7kqN", "category": "other", "type": + "credit", "cvv_match": null, "bank_name": "CREDIT AGRICOLE BANK POLSKA, S.A.", + "avs_street_match": null, "brand": "Visa", "updated_at": "2014-08-06T16:10:41.600581Z", + "fingerprint": "9ea2b317b53183f5a93ba23a594a0b8a0f2183ea9cc338e0964755cd9df71b99", + "can_debit": true, "customer": null, "name": null, "expiration_year": 2020, + "cvv": null, "is_verified": true, "avs_result": null, "can_credit": false, "created_at": + "2014-08-06T16:10:41.600578Z", "address": {"city": null, "line2": null, "line1": + null, "state": null, "postal_code": null, "country_code": null}}' + headers: {} + method: PUT + uri: https://api.balancedpayments.com:443/cards/CC1EVcqDEt16H3uaDsjp7kqN + response: + body: + string: !!binary | + H4sIAAAAAAAAA41U226jMBB971cgnlticydv2STdrXpVk+1DVytksGm8AUNtEzWK+PfFXBKSpqvl + AYkzzMw5M8feXWiaHiOOhT7WftUfmrZr3jWcUrZWcA+oP0sh84zwGtWnP+FseX2fyLmdbvLofioW + 14ucPeldfnXZF0ooeyO84JRJlRgQZEYW9CLHgr6VOCiwImRayAlsBCIfgcSscYKCOLYsn4DAtT3H + iXGAEw9GQaDvC8ebTciJKFNVl5Vpuo+wMotamh+Dx7Zt/5CNNiIsciFRGmZIxqvTGuSjoBxJmrMw + y5lUcWjuO2REIjWcg0yKm7FM4fwlfp/NJXR/WCWaiT+Ft35/GLBGkrzlfKv+zuWqprkvKrcFUXDM + CabyWOhZjhFi65ChrMmaPs9nN0tt8v35Zvp4N9e+TR5utafHu8Xt5FJbGBPjWLuQnBB5XnvEEWvk + vFCBDmllgWvyOETNIk0A7SvgXwF3Cd0xBGPbNCAIfNd7HXTCuF7RqY+oVPKHK2sNR8zzMPwM14uT + SvZJkW6jcY7PBOO8ZJJvw0H0k1tjxEJMonr8Y03ykhw81Y75yGcDj2wJUufCBCYYGvSEoU5FuCGc + JpSo+R41UIY8b2fFqfPEWEtQKg6sVpwkdSF91Jzi0X/Yj5N/7hAaLgCO57+2B7mqB/RbCTq5D9pb + w1Bdw1WeNhdIT2LXcDEorhpWXbydSp83uElG/bUiRl1mD1Sdj7okTEVRSvJFq330qFGzyq8y2lgt + rrqo/gIsC5QGCwUAAA== + headers: + content-encoding: [gzip] + content-length: ['583'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU1DTFMftE4lvobMCsSFSonP/cards?limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA6VUTW/bMAy991cYOuzUJpLtJHaAYsiSdCv6iabrocNgyLbcaLUlV5KDBkX++yR/ + xE6aDsOWg4GQIvnI98i3I8sCERaxBGPrh/5jWW/lV5tTyp6NuTGYl4VUPCNCW8H0O5rdn10lau6m + Kx5eTeXibMHZLajjN8dNooSyJyJyQZkygT7BduigUThwkOckA+w7IbYdPPBdDEMPw8TWdoL9KHIc + j0B/6I4Ggyj242SEQt8H28TRahUIIovU5GVFmm49rMjCCuZr5+e6rtdG45UMci4VToMMq2i5n4O8 + 5lRgRTkLMs6U8SN7WyEjCpvhtG3SuBzLFM0fopfZXKHhN6fAM/krHz2/XHdQY0WeuFib11wtNcxt + UrXOiTFHgsRU7TZ6EGOI2XPAcFZGTe/ms/N7a/L17nx6czm3vkyuL6zbm8vFxeTYWvQmvd3epRKE + qMO9hwKzsp0HKnEbVuSxBh8HuCTShsg9gd4JHN6j4RjBsWv3EPS94eixUymONUX7OqLKtN+lrBIc + sQ+b0XuzJk6ZtveS1IxGPD7gjHjBlFgHHe87tUaYBTEJ9fjHlhIFaTVVjXlHZx2NrAk2e2FDG3YF + uocQUBmsiKAJJWa+OwWMIA/L2WCqNTG2EpzKFtVSkEQnAv1yi/t/IT9B/sgh6g0hHIy8x2qRN3pA + P01DoFF8OTGQYlmKoN/cBF37g4tQQfuc0oyqUwQ/8SSRRJ3CWiSAkdfdBQZtU/XB+ffkZVUNFNWs + gKq6tjSGXJAV5YWRaMstUFwfBhNXkQkSKv6/YT268l7s3dbqAvdiKvNCEQOkofOtZLVH401/660B + VZ7uRe5QUcc13k0z6jpIJw2WPC2v/oFS5lXt3ylWrsUHMbXPdHi0+Q2h8zE4VwYAAA== + headers: + content-encoding: [gzip] + content-length: ['676'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"amount": 1061, "meta": {"state": "new", "participant_id": 4}, "description": + "bob"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/cards/CC1EVcqDEt16H3uaDsjp7kqN/card_holds + response: + body: {string: !!python/unicode "{\n \"errors\": [\n {\n \"status\": + \"Payment Required\",\n \"category_code\": \"card-declined\",\n \"additional\": + \"Account Frozen\",\n \"status_code\": 402,\n \"category_type\": + \"banking\",\n \"extras\": {},\n \"request_id\": \"OHM3750c8d21d8411e4ac8902b12035401b\",\n + \ \"description\": \"R758: Account Frozen. Your request id is OHM3750c8d21d8411e4ac8902b12035401b.\"\n + \ }\n ]\n}"} + headers: + content-length: ['387'] + content-type: [application/json] + status: {code: 402, message: PAYMENT REQUIRED} +- request: + body: '{"meta": {"seq": 5}}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/customers + response: + body: {string: !!python/unicode "{\n \"customers\": [\n {\n \"name\": + null,\n \"links\": {\n \"source\": null,\n \"destination\": + null\n },\n \"updated_at\": \"2014-08-06T16:10:43.645536Z\",\n \"created_at\": + \"2014-08-06T16:10:43.529220Z\",\n \"dob_month\": null,\n \"id\": + \"CU1H61sY8q0ahFI1LKltdoOY\",\n \"phone\": null,\n \"href\": \"/customers/CU1H61sY8q0ahFI1LKltdoOY\",\n + \ \"merchant_status\": \"no-match\",\n \"meta\": {\n \"seq\": + \"5\"\n },\n \"dob_year\": null,\n \"address\": {\n \"city\": + null,\n \"line2\": null,\n \"line1\": null,\n \"state\": + null,\n \"postal_code\": null,\n \"country_code\": null\n },\n + \ \"business_name\": null,\n \"ssn_last4\": null,\n \"email\": + null,\n \"ein\": null\n }\n ],\n \"links\": {\n \"customers.source\": + \"/resources/{customers.source}\",\n \"customers.card_holds\": \"/customers/{customers.id}/card_holds\",\n + \ \"customers.bank_accounts\": \"/customers/{customers.id}/bank_accounts\",\n + \ \"customers.debits\": \"/customers/{customers.id}/debits\",\n \"customers.destination\": + \"/resources/{customers.destination}\",\n \"customers.external_accounts\": + \"/customers/{customers.id}/external_accounts\",\n \"customers.cards\": + \"/customers/{customers.id}/cards\",\n \"customers.disputes\": \"/customers/{customers.id}/disputes\",\n + \ \"customers.transactions\": \"/customers/{customers.id}/transactions\",\n + \ \"customers.refunds\": \"/customers/{customers.id}/refunds\",\n \"customers.reversals\": + \"/customers/{customers.id}/reversals\",\n \"customers.orders\": \"/customers/{customers.id}/orders\",\n + \ \"customers.credits\": \"/customers/{customers.id}/credits\"\n }\n}"} + headers: + content-length: ['1619'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"expiration_month": 12, "number": "4242424242424242", "expiration_year": + 2020}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/cards + response: + body: {string: !!python/unicode "{\n \"cards\": [\n {\n \"links\": {\n + \ \"customer\": null\n },\n \"fingerprint\": \"1e2c425a579a1c7f27a037f0662b855035ceadbff18a0adbe785fb07e2afe1cc\",\n + \ \"cvv_result\": null,\n \"number\": \"xxxxxxxxxxxx4242\",\n \"avs_postal_match\": + null,\n \"expiration_month\": 12,\n \"meta\": {},\n \"id\": + \"CC1Iivi5I2HmI7btXkS1ze6s\",\n \"category\": \"other\",\n \"type\": + \"credit\",\n \"cvv_match\": null,\n \"bank_name\": \"\",\n \"avs_street_match\": + null,\n \"brand\": \"Visa\",\n \"updated_at\": \"2014-08-06T16:10:44.599088Z\",\n + \ \"address\": {\n \"city\": null,\n \"line2\": null,\n + \ \"line1\": null,\n \"state\": null,\n \"postal_code\": + null,\n \"country_code\": null\n },\n \"can_debit\": true,\n + \ \"name\": null,\n \"expiration_year\": 2020,\n \"cvv\": null,\n + \ \"is_verified\": true,\n \"avs_result\": null,\n \"can_credit\": + false,\n \"href\": \"/cards/CC1Iivi5I2HmI7btXkS1ze6s\",\n \"created_at\": + \"2014-08-06T16:10:44.599085Z\"\n }\n ],\n \"links\": {\n \"cards.card_holds\": + \"/cards/{cards.id}/card_holds\",\n \"cards.customer\": \"/customers/{cards.customer}\",\n + \ \"cards.disputes\": \"/cards/{cards.id}/disputes\",\n \"cards.debits\": + \"/cards/{cards.id}/debits\"\n }\n}"} + headers: + access-control-allow-headers: [Content-Type] + access-control-allow-methods: ['POST, OPTIONS'] + access-control-allow-origin: ['*'] + content-length: ['1236'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"links": {"customer": "/customers/CU1H61sY8q0ahFI1LKltdoOY"}, "cvv_result": + null, "number": "xxxxxxxxxxxx4242", "avs_postal_match": null, "expiration_month": + 12, "meta": {}, "id": "CC1Iivi5I2HmI7btXkS1ze6s", "category": "other", "type": + "credit", "cvv_match": null, "bank_name": "", "avs_street_match": null, "brand": + "Visa", "updated_at": "2014-08-06T16:10:44.599088Z", "fingerprint": "1e2c425a579a1c7f27a037f0662b855035ceadbff18a0adbe785fb07e2afe1cc", + "can_debit": true, "customer": null, "name": null, "expiration_year": 2020, + "cvv": null, "is_verified": true, "avs_result": null, "can_credit": false, "created_at": + "2014-08-06T16:10:44.599085Z", "address": {"city": null, "line2": null, "line1": + null, "state": null, "postal_code": null, "country_code": null}}' + headers: {} + method: PUT + uri: https://api.balancedpayments.com:443/cards/CC1Iivi5I2HmI7btXkS1ze6s + response: + body: + string: !!binary | + H4sIAAAAAAAAA41U227bMAx971cYfm4TSfEteS0wNNiAPeyCtcVgyBLdCLFlT5KDZoH/fZIviZOm + WP1g2KQOeUge8XDjeT6jimt/5T3bH887dG9rLoTcOvNocCcbbaoSlLX69z/wQ4T1Y/IH0c2nNf7y + uTC8+vroD/j2dgyUC/kCqlZCGgfEQFhAQhrGS4pZnJOYokWcoygiWRKGaBEyoDzLc5xQZD8gTsI8 + QzEQmgNmzD8GZrtdqkA3hYsrm6I4emRTZj3N18kTkICc0HSn07rShhZpSQ3bXMaA11ooakQl07KS + xvkxOWYowVDXnFOZgndtucdrsRPhmjyU6zgzv7bf8F+I9IQ1NfBSqb07XZmNpXkMavY1ODNTwIU5 + L/Qqx4zKbSpp2aHOS9NGAZjrpWWKyo7tT6HpCdbU3HLjKe3mRBAO7lByh6LvOFphtAqC2TIJk0Xy + NMnEuZ3ApUyEcdVNJ9LrCch1M35rtnMxrqqLIMPAWMWvOFnVSKP26cT7RoyMypRDZru78oxq4CSZ + votnMppIYA/UyZ4ggqb6u2DoC53uQIlcgOvvWQKnt+tqdZyGka+8nBb6xGqjILeB/Hl3SecfUJeC + /8wwXC5REj7197S1DfrtCrq47v1SmLms6aYquv0wkjh0XGaCtx2rwd93ZcRNFsV83Bp6PiBHQzvo + aABxoevGwDupjt6zRN0o30P0Pltce9P+AyYgRuPqBAAA + headers: + content-encoding: [gzip] + content-length: ['546'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"expiration_month": 12, "number": "4242424242424242", "expiration_year": + 2030}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/cards + response: + body: {string: !!python/unicode "{\n \"cards\": [\n {\n \"links\": {\n + \ \"customer\": null\n },\n \"fingerprint\": \"d34d613121ae61ae732d86eaf09929617bd3f5ccc60f7364d32ae1afc5f81745\",\n + \ \"cvv_result\": null,\n \"number\": \"xxxxxxxxxxxx4242\",\n \"avs_postal_match\": + null,\n \"expiration_month\": 12,\n \"meta\": {},\n \"id\": + \"CC1K1gP7SunZXxzUAe188mGx\",\n \"category\": \"other\",\n \"type\": + \"credit\",\n \"cvv_match\": null,\n \"bank_name\": \"\",\n \"avs_street_match\": + null,\n \"brand\": \"Visa\",\n \"updated_at\": \"2014-08-06T16:10:46.133144Z\",\n + \ \"address\": {\n \"city\": null,\n \"line2\": null,\n + \ \"line1\": null,\n \"state\": null,\n \"postal_code\": + null,\n \"country_code\": null\n },\n \"can_debit\": true,\n + \ \"name\": null,\n \"expiration_year\": 2030,\n \"cvv\": null,\n + \ \"is_verified\": true,\n \"avs_result\": null,\n \"can_credit\": + false,\n \"href\": \"/cards/CC1K1gP7SunZXxzUAe188mGx\",\n \"created_at\": + \"2014-08-06T16:10:46.133142Z\"\n }\n ],\n \"links\": {\n \"cards.card_holds\": + \"/cards/{cards.id}/card_holds\",\n \"cards.customer\": \"/customers/{cards.customer}\",\n + \ \"cards.disputes\": \"/cards/{cards.id}/disputes\",\n \"cards.debits\": + \"/cards/{cards.id}/debits\"\n }\n}"} + headers: + access-control-allow-headers: [Content-Type] + access-control-allow-methods: ['POST, OPTIONS'] + access-control-allow-origin: ['*'] + content-length: ['1236'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"links": {"customer": "/customers/CU1H61sY8q0ahFI1LKltdoOY"}, "cvv_result": + null, "number": "xxxxxxxxxxxx4242", "avs_postal_match": null, "expiration_month": + 12, "meta": {}, "id": "CC1K1gP7SunZXxzUAe188mGx", "category": "other", "type": + "credit", "cvv_match": null, "bank_name": "", "avs_street_match": null, "brand": + "Visa", "updated_at": "2014-08-06T16:10:46.133144Z", "fingerprint": "d34d613121ae61ae732d86eaf09929617bd3f5ccc60f7364d32ae1afc5f81745", + "can_debit": true, "customer": null, "name": null, "expiration_year": 2030, + "cvv": null, "is_verified": true, "avs_result": null, "can_credit": false, "created_at": + "2014-08-06T16:10:46.133142Z", "address": {"city": null, "line2": null, "line1": + null, "state": null, "postal_code": null, "country_code": null}}' + headers: {} + method: PUT + uri: https://api.balancedpayments.com:443/cards/CC1K1gP7SunZXxzUAe188mGx + response: + body: + string: !!binary | + H4sIAAAAAAAAA41UbW+bMBD+3l+B+Lwm2BBC8q2qtBd10iZtndZMFXLsI7EKhtkmShbx32fznpRq + A4HEHc/dc3eP73zjOC4lkil37fwyH45zrt/GnHLxYs2dwf5ZKp1nII3VvX9EH0OknqLfHtm//4Q+ + P6Sa5V+e3BZfvesCJVzsQBaSC22BzA9YiHyEEYHQPEsfsygEknirFV6FaLllfrKglIZesvTDgPmY + ACIJXSQRWgYLtw9MD4dYgipTG1eUadp7RJltG5rH0RXgAA9oclBxkStN0jgjmu6vY8Cx4JJonos4 + y4W2foT7DBloYpszlMlZ3ZZ79IB2X5ffSrH5efzzeAcoirIPxxFromGXy5P9O9d7Q7MPqk8FWDOV + wLi+LHSS45aIl1iQrEZdlqa0BNDTpW0lETXbH1yRAVYWzHBjMannhD0U3HrRrRd+R+EaeesgnEWR + Z+7NKBNjZgLXMuHaVjeeSKMnwNNm9Nps5qJtVVdB2oHRnE04aV4KLU/xyPtKjJSImMHWdHftaFnC + IJmmixcyGkngBMTKHnu+N9bfFUOXq/gAkiccbH8vEli9TavVcmpHvnYSkqqB1V5CYgK58/qQzv9D + XRL+MUPk+yjAm+acVqZBz7agq+PeLIWZzRrv87TeDx2Jc81lxllVs2r9TVc63GhRzLutoeYtsjNU + rY5aEOOqKDW8kar3XiSqR/kWovGZ4qqb6i+YkJej6gQAAA== + headers: + content-encoding: [gzip] + content-length: ['547'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU1H61sY8q0ahFI1LKltdoOY/cards?limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA+VW22obMRB9z1eYfehTY0vaqw2hlEAbk0ILSUqSUhatNIpF9uJqtcZO8L9X2ou9 + dhxSWkqgtbGxZ3ZGczlzRo9Hg4HDqOKlMxl8M38Gg8f624hTmd9bcSewT1alLjJQRuqcXuGzAJc3 + 0Q9EZx+m+NN5qnnx+cZp7ddvO0dC5neg5krm2hpiIMwjPvXDMcUsFCSkyA0FCgKSRL6PXJ8B5YkQ + OKLI/IAw8kWCQiBUAGbM2Thmi0WsoKxS6zev0nSjyassacJc9l4e8cjWmi7KeF6UmqZxRjWb7fuA + 5VwqqmWRx1mRa6vHZHNCBpra4mzTlLwuyymeyoX0p+Qsm4aJvr6/wA8QlL2oqYa7Qq3s04WemTA3 + TvVqDlbMFHCpdxM9GGNC8/s4p1lttZtaqRWAPpxaomheR/tVlnRrVs25iY3HtO4TQdg7RtExCi5x + MMFo4nnDceRHbnTbO4lz04F9mEhts+t3pMETkMNi/FRs+qJtVntO2oaxgh9QsqLKtVrFPe0TMDKa + xxwSU93JQKsKtpBpqrgDox4EVkAt7AkiqI+/vQgdWcYLUFJIsPXdOcDi7TBabUxtyycDQdNyG9VM + gTCOnFE9pKNfQJeCF3roj8co8m+bOW3h+9eHnrseD7CLCaYQmE/oEh4FQAUaj8k4wGHCXeEzxgIk + QjfwuEsoYCqYLyIcev7uLBwu46sO/Tm++xJeVPnt9fLh6j3gKMo+Lv+FoQ+GUYTM+78eeveVh/4l + dL0w9MEQuy72SDf0hhW/WxZzui1W06ST0rJm/lG35w3hPLPlGz56l8pM6hOM3hRClKBPUIt4J4fl + 7lJ2tkzWXiJ+33l9qgkUt11xmtONpBPMFSxkUdm9tCV0Rxdm2VsSbxjcEVL9ecKmdDWJ7t2XmlvV + sH9j6pX1sabzjXbdla0Rc1nOKw02+o74WwPJ16ONts2idWUcxrMirW9yB6zsU61+x67ehc/YtDqb + 4dH6J9Yl180rCgAA + headers: + content-encoding: [gzip] + content-length: ['753'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"meta": {"seq": 6}}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/customers + response: + body: {string: !!python/unicode "{\n \"customers\": [\n {\n \"name\": + null,\n \"links\": {\n \"source\": null,\n \"destination\": + null\n },\n \"updated_at\": \"2014-08-06T16:10:47.916458Z\",\n \"created_at\": + \"2014-08-06T16:10:47.747801Z\",\n \"dob_month\": null,\n \"id\": + \"CU1LPZ5SkBmi1Spr6shPbNnT\",\n \"phone\": null,\n \"href\": \"/customers/CU1LPZ5SkBmi1Spr6shPbNnT\",\n + \ \"merchant_status\": \"no-match\",\n \"meta\": {\n \"seq\": + \"6\"\n },\n \"dob_year\": null,\n \"address\": {\n \"city\": + null,\n \"line2\": null,\n \"line1\": null,\n \"state\": + null,\n \"postal_code\": null,\n \"country_code\": null\n },\n + \ \"business_name\": null,\n \"ssn_last4\": null,\n \"email\": + null,\n \"ein\": null\n }\n ],\n \"links\": {\n \"customers.source\": + \"/resources/{customers.source}\",\n \"customers.card_holds\": \"/customers/{customers.id}/card_holds\",\n + \ \"customers.bank_accounts\": \"/customers/{customers.id}/bank_accounts\",\n + \ \"customers.debits\": \"/customers/{customers.id}/debits\",\n \"customers.destination\": + \"/resources/{customers.destination}\",\n \"customers.external_accounts\": + \"/customers/{customers.id}/external_accounts\",\n \"customers.cards\": + \"/customers/{customers.id}/cards\",\n \"customers.disputes\": \"/customers/{customers.id}/disputes\",\n + \ \"customers.transactions\": \"/customers/{customers.id}/transactions\",\n + \ \"customers.refunds\": \"/customers/{customers.id}/refunds\",\n \"customers.reversals\": + \"/customers/{customers.id}/reversals\",\n \"customers.orders\": \"/customers/{customers.id}/orders\",\n + \ \"customers.credits\": \"/customers/{customers.id}/credits\"\n }\n}"} + headers: + content-length: ['1619'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU1LPZ5SkBmi1Spr6shPbNnT/cards?limit=10&offset=0 + response: + body: {string: !!python/unicode "{\n \"cards\": [],\n \"meta\": {\n \"last\": + \"/customers/CU1LPZ5SkBmi1Spr6shPbNnT/cards?limit=10&offset=0\",\n \"next\": + null,\n \"href\": \"/customers/CU1LPZ5SkBmi1Spr6shPbNnT/cards?limit=10&offset=0\",\n + \ \"limit\": 10,\n \"offset\": 0,\n \"previous\": null,\n \"total\": + 0,\n \"first\": \"/customers/CU1LPZ5SkBmi1Spr6shPbNnT/cards?limit=10&offset=0\"\n + \ },\n \"links\": {}\n}"} + headers: + content-length: ['364'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA6VVW2+bMBR+76+weNhTmwBOyEWqprSbVq1NWq1dO3WakIPtxiqxmW2yoCr/fbaB + AL1o08YDEud+vvOdw9MBAF6CJFbeFHw3HwA8ubcRp4w/WnEtsJa50mJNpJF6p1/h+TdcbBbXH0hx + cQWz2Z2crH5ir/LfHdaBKOMPRGaScW0dx8mI+oMQwmiI6HicQAKjhPrhaBCRBEUDihMKI4yTkAQU + Tow5SSYUUor9IQqjkbcPnGw2sSQqT21cnqfpXsPz9bIsc9t6AvM03mij4kwojdJ4jXSysrVx0ejJ + NmMSaSZ4vBZcW33g7zOsiUZdcCR5MLYOGsFpruxHbW6xY7qItfjlLNoKhLFpQsWhVZyILQhfQsiw + i3sK52cn6i7anKELqPKLW3xzu7yctBBBmjwIWVhroVcGgn3BusiIFSeSYKa7INb9dzBcIv4Yc7R2 + Xp+v5pdfPs0W4PRsdv0RnMwW54dg0Zv1ungqLQnRDZ4FUY3BUiLu+rhlCjXiPMOmahwjx47QDwZH + /ujID26C4XQAp4NhbzwMQhjct1KVkBn7NjkNwEbS7qFkMbHIviIObD4TGcwR4+Dald4ejKGGds2/ + Os+KOonAzmbih4Hf9k5EzrUs4srA5n+xGQniMSZLM44p0DInDX9L2DvzaPGxIMjuYOiHDSHNMjxr + 02Mq3hDJKCMW9k4CS/796nhl76BiIjBjAmV7wFYPsABcaOBY0hq4rb5i0xRQlKqm/pUk1KLSd7el + /xfEleQPJBhEcBLA+3I3dgbKHxYtr7OHXoqUY1G/vlQm9xt3qiztfcrWTB8H/jtBqSL6uJ6hx8m2 + e1a8pqnqDP57cJfVFFofFK/MbiTVQL1Mkg0TuT3ADQs8Lcy5sn4lUzzK5P83bGB0x/rZxS//Cz3M + VJZrs8fNOJ/cVHsM7/p7bVVQqWn/J1qjqPxq7a5alyqRdY1XInX/opo5rVQtfSeZW6A3fCqd7fBg + 9xv4QHhu7QYAAA== + headers: + content-encoding: [gzip] + content-length: ['751'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"amount": 1000, "meta": {"state": "new", "participant_id": 2}, "description": + "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/cards/CC3MHBsW6vHaL3suLVdTVbO9/card_holds + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": null\n },\n \"updated_at\": + \"2014-08-06T16:10:49.329099Z\",\n \"created_at\": \"2014-08-06T16:10:49.118601Z\",\n + \ \"transaction_number\": \"HL656-773-9031\",\n \"expires_at\": \"2014-08-13T16:10:49.239247Z\",\n + \ \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": + 1000,\n \"meta\": {\n \"state\": \"new\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/card_holds/HL1NnMRbDzyqPSlCLkibOXSw\",\n + \ \"failure_reason_code\": null,\n \"voided_at\": null,\n \"id\": + \"HL1NnMRbDzyqPSlCLkibOXSw\"\n }\n ],\n \"links\": {\n \"card_holds.events\": + \"/card_holds/{card_holds.id}/events\",\n \"card_holds.card\": \"/cards/{card_holds.card}\",\n + \ \"card_holds.debits\": \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": + \"/debits/{card_holds.debit}\"\n }\n}"} + headers: + content-length: ['944'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"status": "succeeded", "transaction_number": "HL656-773-9031", "description": + "janet", "amount": 1000, "created_at": "2014-08-06T16:10:49.118601Z", "card_href": + "/cards/CC3MHBsW6vHaL3suLVdTVbO9", "updated_at": "2014-08-06T16:10:49.329099Z", + "expires_at": "2014-08-13T16:10:49.239247Z", "failure_reason": null, "currency": + "USD", "is_void": true, "meta": {"state": "cancelled", "participant_id": "2"}, + "debit": null, "failure_reason_code": null, "voided_at": null, "id": "HL1NnMRbDzyqPSlCLkibOXSw"}' + headers: {} + method: PUT + uri: https://api.balancedpayments.com:443/card_holds/HL1NnMRbDzyqPSlCLkibOXSw + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": null\n },\n \"updated_at\": + \"2014-08-06T16:10:49.892521Z\",\n \"created_at\": \"2014-08-06T16:10:49.118601Z\",\n + \ \"transaction_number\": \"HL656-773-9031\",\n \"expires_at\": \"2014-08-13T16:10:49.239247Z\",\n + \ \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": + 1000,\n \"meta\": {\n \"state\": \"cancelled\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/card_holds/HL1NnMRbDzyqPSlCLkibOXSw\",\n + \ \"failure_reason_code\": null,\n \"voided_at\": \"2014-08-06T16:10:49.892523Z\",\n + \ \"id\": \"HL1NnMRbDzyqPSlCLkibOXSw\"\n }\n ],\n \"links\": {\n + \ \"card_holds.events\": \"/card_holds/{card_holds.id}/events\",\n \"card_holds.card\": + \"/cards/{card_holds.card}\",\n \"card_holds.debits\": \"/card_holds/{card_holds.id}/debits\",\n + \ \"card_holds.debit\": \"/debits/{card_holds.debit}\"\n }\n}"} + headers: + content-length: ['975'] + content-type: [application/json] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/py/fixtures/TestPaydayChargeOnBalanced.yml b/tests/py/fixtures/TestChargeOnBalanced.yml similarity index 55% rename from tests/py/fixtures/TestPaydayChargeOnBalanced.yml rename to tests/py/fixtures/TestChargeOnBalanced.yml index 1200e15abd..8a7410c67a 100644 --- a/tests/py/fixtures/TestPaydayChargeOnBalanced.yml +++ b/tests/py/fixtures/TestChargeOnBalanced.yml @@ -3,46 +3,46 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd response: body: string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIkp028NXtJbcU6aEtCmFNshURiXT4CGIY+vcubUmmSaXs - RYfdmSF3dsTjTZblxGojO6Z0vsl+YiHLjqcvtgR0DKvCtu2HsdZy8eygIwhhWlpFQiDWKdOGCzBc - ikFlEOknNbunYBitwSAir5blerH8tFiWT2W5WVWbqrpd35X398sf+UQhiiUoq2p993HlUajc1Z0U - pgmH4dQdu/1Wfd3yPw/bl8fP9PvjF/LUvK4e3tTlzH0jRThg3ij229GLycEirYRGkwaEqbUBY52R - uZCLDgxpLsd1zEBgMXtx0DKPHHSzHRiocDSgVDEdbIpwcwiAuCdcKavmy2VcdhcPvUCRvcRGWxNJ - Z5pEWmHUwe9Gg+ysxntoXc+lTmtRt6DNOhyTdcDbqMivAtfjWb9cftykXngv0b+dIpwX6Nopz7o4 - Tosd+v2wIo9IQNG6kS09rdKLgkfmtC883DnJnsYOxHMN5GRSQuYaGilRtuMpiQEzw/X/1nd88H7p - GTPYm2FKYAr+b5gYHl3K2Zaw5AyJmJTrvTUsQZ5QEd8oEBqIe7wSGlfISAcfCStSM4ygGfYrvszQ - Jq6g2AiLFKSi57f9H+EcMBEXn1qazNMIwv+rv+n/AoxtLhJTBgAA + H4sIAAAAAAAAA41Uy27bMBC85ysEnWvLipQ29i1oby2CAG3RokUh0CQLEZFIhY+ggqF/79KWZJpU + wlx02J0ZcmdHPFwlSYqN0qKlUqW75DcUkuRw/EKLo5ZClZumeTfVGsYfLXQCAUwJI7EPhDqhSjOO + NBN8VBlFhlnNdARpSiqkAZFeb/Jytfmw2uTf8ptdWezKcp0Xxfvb7a90pmBJX6UU622+uSlKh0LE + vmoF17U/DCP22I/fi88/Sf98//UT7b88FN3dD7mtn8j5zK4W3B8wrSX9a+nZ7GAWVwKjcY24rpRG + 2lgjUy5WLdK4Ph/XUo08i+mTheZp4KCdradI+qMhQiRV3qYw070HhD3BSun1cjkPy/bivhcg0glo + NBUWZKGJheFa9m43GGRvFNxDqWopdUrxqkFKl/6YtEWsCYrsInADnPXH5sdO6oT3HP31HOE0A9eO + eVbZYV7s2B/GFTlEjCSpatGQ4yqdKDhkRobMwZ2S7GjsEX+sED6aFJG5hAZKhO5ZTGLELHDdv/UF + H5xfesEM+k9TySEFbxsmhAeXsrZFLDlBAiZhqjOaRsgzKuBribhC2D5eEY0LZKADj4ThsRkm0AL7 + GV5m1ESuIOkECxSEJKe3/ZVwjpiAC08tieZpAsH/NVwN/wHQiK4AUwYAAA== headers: content-encoding: [gzip] - content-length: ['495'] + content-length: ['499'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/cards?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA6VVyW7bMBC95ysIHXpKbIlyvAFB4ThBigRx9gJNUQg0F5uITDok5dgI/O8lKcmS - sqBFy4MAzcKZefNm+LoHQICRIjoYgp/2B4BX/7XilIsnJy4FzjLTRi6ostJg/ABvx3x2Pn6+OSE/ - bk7x/XwVn69VUPhv98uLGBczqpaKC+Mc+7jHwg6M4+4hYv0+jmncxSyEvU6XYtTtMIJZ3CUEQxqx - eGDNKR6wmDESHiLY7QW7i/FqlSiqs9TdK7I03WlEtpjmaa5rJ7Kn8kYrnSylNihNFsjguctNyEpP - 10uukOFSJAspjNNH4S7CghrUBEfRmbX10EjBMu1+SnOHHTebxMgXb1FXIEJsETqBTnEs1wC+h5AT - f+8Y3p1dn0yujx9CeXUxRVQPzPO4VhNGhs6k2jhraeYWgl3CZrOkTowVJdw0QSzrb2A4ReIpEWjh - vc6vL69uz0YTMP42ujsFx6PJxT6YtEatJp7aKEpNheeG6spgqpDwdXznGlXibE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jkNwEbS7qFkMbHIviIObD4TGcwR4+Dald4ejKGGds2/ + Os+KOonAzmbih4Hf9k5EzrUs4srA5n+xGQniMSZLM44p0DInDX9L2DvzaPGxIMjuYOiHDSHNMjxr + 02Mq3hDJKCMW9k4CS/796nhl76BiIjBjAmV7wFYPsABcaOBY0hq4rb5i0xRQlKqm/pUk1KLSd7el + /xfEleQPJBhEcBLA+3I3dgbKHxYtr7OHXoqUY1G/vlQm9xt3qiztfcrWTB8H/jtBqSL6uJ6hx8m2 + e1a8pqnqDP57cJfVFFofFK/MbiTVQL1Mkg0TuT3ADQs8Lcy5sn4lUzzK5P83bGB0x/rZxS//Cz3M + VJZrs8fNOJ/cVHsM7/p7bVVQqWn/J1qjqPxq7a5alyqRdY1XInX/opo5rVQtfSeZW6A3fCqd7fBg + 9xv4QHhu7QYAAA== headers: content-encoding: [gzip] content-length: ['751'] @@ -52,17 +52,17 @@ interactions: body: '{"amount": 1061, "description": "janet"}' headers: {} method: POST - uri: https://api.balancedpayments.com:443/cards/CC2SGPDNPBU0oOKbaes9tqC1/debits + uri: https://api.balancedpayments.com:443/cards/CC3MHBsW6vHaL3suLVdTVbO9/debits response: body: {string: !!python/unicode "{\n \"debits\": [\n {\n \"status\": \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"customer\": - \"CU2RCigJCqQDdYQEcThv3Jxr\",\n \"source\": \"CC2SGPDNPBU0oOKbaes9tqC1\",\n + \"CU3KXdyvNSDeyLP3pAWr9hqd\",\n \"source\": \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \ \"order\": null,\n \"dispute\": null\n },\n \"updated_at\": - \"2014-07-01T11:33:03.633978Z\",\n \"created_at\": \"2014-07-01T11:33:03.009437Z\",\n - \ \"transaction_number\": \"W252-963-4934\",\n \"failure_reason\": + \"2014-07-01T15:44:33.253102Z\",\n \"created_at\": \"2014-07-01T15:44:32.580309Z\",\n + \ \"transaction_number\": \"W640-770-4849\",\n \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": 1061,\n \"failure_reason_code\": - null,\n \"meta\": {},\n \"href\": \"/debits/WD3BnKoWXRGDPxtvoKwfPl3P\",\n - \ \"appears_on_statement_as\": \"BAL*example.com\",\n \"id\": \"WD3BnKoWXRGDPxtvoKwfPl3P\"\n + null,\n \"meta\": {},\n \"href\": \"/debits/WD4DH9NCjErBiN50xl2g0AkN\",\n + \ \"appears_on_statement_as\": \"BAL*example.com\",\n \"id\": \"WD4DH9NCjErBiN50xl2g0AkN\"\n \ }\n ],\n \"links\": {\n \"debits.customer\": \"/customers/{debits.customer}\",\n \ \"debits.dispute\": \"/disputes/{debits.dispute}\",\n \"debits.source\": \"/resources/{debits.source}\",\n \"debits.order\": \"/orders/{debits.order}\",\n @@ -80,9 +80,9 @@ interactions: response: body: {string: !!python/unicode "{\n \"customers\": [\n {\n \"name\": null,\n \"links\": {\n \"source\": null,\n \"destination\": - null\n },\n \"updated_at\": \"2014-07-01T11:33:04.159328Z\",\n \"created_at\": - \"2014-07-01T11:33:04.040810Z\",\n \"dob_month\": null,\n \"id\": - \"CU3CxhsF9DKgEuHqdgc1pfjD\",\n \"phone\": null,\n \"href\": \"/customers/CU3CxhsF9DKgEuHqdgc1pfjD\",\n + null\n },\n \"updated_at\": \"2014-07-01T15:44:33.831067Z\",\n \"created_at\": + \"2014-07-01T15:44:33.712647Z\",\n \"dob_month\": null,\n \"id\": + \"CU4EY3YAnRRePOiqhVPwnzJH\",\n \"phone\": null,\n \"href\": \"/customers/CU4EY3YAnRRePOiqhVPwnzJH\",\n \ \"merchant_status\": \"no-match\",\n \"meta\": {\n \"seq\": \"3\"\n },\n \"dob_year\": null,\n \"address\": {\n \"city\": null,\n \"line2\": null,\n \"line1\": null,\n \"state\": @@ -114,16 +114,16 @@ interactions: \ \"customer\": null\n },\n \"fingerprint\": \"9ea2b317b53183f5a93ba23a594a0b8a0f2183ea9cc338e0964755cd9df71b99\",\n \ \"cvv_result\": null,\n \"number\": \"xxxxxxxxxxxx4448\",\n \"avs_postal_match\": null,\n \"expiration_month\": 12,\n \"meta\": {},\n \"id\": - \"CC3DQO5ZMPJ5apmJH2CY5Gfz\",\n \"category\": \"other\",\n \"type\": + \"CC4FZsgPsRQlCDpQ75K0PC17\",\n \"category\": \"other\",\n \"type\": \"credit\",\n \"cvv_match\": null,\n \"bank_name\": \"CREDIT AGRICOLE BANK POLSKA, S.A.\",\n \"avs_street_match\": null,\n \"brand\": - \"Visa\",\n \"updated_at\": \"2014-07-01T11:33:05.211516Z\",\n \"address\": + \"Visa\",\n \"updated_at\": \"2014-07-01T15:44:34.623376Z\",\n \"address\": {\n \"city\": null,\n \"line2\": null,\n \"line1\": null,\n \ \"state\": null,\n \"postal_code\": null,\n \"country_code\": null\n },\n \"can_debit\": true,\n \"name\": null,\n \"expiration_year\": 2020,\n \"cvv\": null,\n \"is_verified\": true,\n \"avs_result\": - null,\n \"can_credit\": false,\n \"href\": \"/cards/CC3DQO5ZMPJ5apmJH2CY5Gfz\",\n - \ \"created_at\": \"2014-07-01T11:33:05.211514Z\"\n }\n ],\n \"links\": + null,\n \"can_credit\": false,\n \"href\": \"/cards/CC4FZsgPsRQlCDpQ75K0PC17\",\n + \ \"created_at\": \"2014-07-01T15:44:34.623373Z\"\n }\n ],\n \"links\": {\n \"cards.card_holds\": \"/cards/{cards.id}/card_holds\",\n \"cards.customer\": \"/customers/{cards.customer}\",\n \"cards.disputes\": \"/cards/{cards.id}/disputes\",\n \ \"cards.debits\": \"/cards/{cards.id}/debits\"\n }\n}"} @@ -135,110 +135,110 @@ interactions: content-type: [application/json] status: {code: 201, message: CREATED} - request: - body: '{"links": {"customer": "/customers/CU3CxhsF9DKgEuHqdgc1pfjD"}, "cvv_result": + body: '{"links": {"customer": "/customers/CU4EY3YAnRRePOiqhVPwnzJH"}, "cvv_result": null, "number": "xxxxxxxxxxxx4448", "expiration_month": 12, "meta": {}, "id": - "CC3DQO5ZMPJ5apmJH2CY5Gfz", "category": "other", "is_verified": true, "type": + "CC4FZsgPsRQlCDpQ75K0PC17", "category": "other", "is_verified": true, "type": "credit", "cvv_match": null, "bank_name": "CREDIT AGRICOLE BANK POLSKA, S.A.", - "avs_street_match": null, "brand": "Visa", "updated_at": "2014-07-01T11:33:05.211516Z", + "avs_street_match": null, "brand": "Visa", "updated_at": "2014-07-01T15:44:34.623376Z", "fingerprint": "9ea2b317b53183f5a93ba23a594a0b8a0f2183ea9cc338e0964755cd9df71b99", "can_debit": true, "name": null, "expiration_year": 2020, "can_credit": false, - "avs_postal_match": null, "avs_result": null, "cvv": null, "created_at": "2014-07-01T11:33:05.211514Z", + "avs_postal_match": null, "avs_result": null, "cvv": null, "created_at": "2014-07-01T15:44:34.623373Z", "address": {"city": null, "line2": null, "line1": null, "state": null, "postal_code": null, "country_code": null}}' headers: {} method: PUT - uri: https://api.balancedpayments.com:443/cards/CC3DQO5ZMPJ5apmJH2CY5Gfz + uri: https://api.balancedpayments.com:443/cards/CC4FZsgPsRQlCDpQ75K0PC17 response: body: string: !!binary | - H4sIAAAAAAAAA41U23KbMBB9z1cwPCc24lLAby52c3Eap0nambrTYQQSthoQVBIeux7+vRIXGzvO - tDwww1l295zdI+0uNE2PIUNcH2k/5Iem7eq3hFNCXxXcAerPkos8w0yievDVCjYr/smfzJbT8uY3 - WsagSH5N9Da/uuwKJYQuMSsYoUIl+hiakQXcyLGAZyUO9K0ImhZ0fBsakQeNxJQ4hn4cW5aHDf+D - 7TpOjHyUuCDyfX1fOF6vQ4Z5maq6tEzTfYSWWdTQ3PQe27a9QzZc87DIuYBpmEERr05r4E1BGBQk - p2GWU6HiwNx3yLCAajgHmQTVYwmsyZe5s/j8eOfAIru7MYPvznXyp8caCrzM2Vb9nYuVpLkvKrYF - VnDMMCLiWOhZjhGkryGFWZ0VPE0nty/a+PrpNpjfT7WP44eZ9ji/f56NL7XnwXhwrJ0LhrE4rz1i - kNZyvhEOD2llgSR5FMJ6kaYB7CvDvTLACwAjyxoZzsAFtuuBRa8TQnJFpz4iQsnvr6wxHD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- content-length: ['584'] + content-length: ['585'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU3CxhsF9DKgEuHqdgc1pfjD + uri: https://api.balancedpayments.com:443/customers/CU4EY3YAnRRePOiqhVPwnzJH response: body: string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnetIslw08TVpUSDX9NKiENYkEzGRSIWPIoahf+/SlmRaVMtc - dNidGXJnRzxcJUlKrDayZUqn2+QXFpLkcPxiS0DLsCps03waaw0Xrw46ghCmpVVkDsQ6ZdpwAYZL - MagMIv2kZjsKhtEKDCLSdV5sVvmXVV48FsW2LLf55rr4fFuub36mE4UoFqHkm/ymyD0KlbuqlcLU - 82E4dcfe/Sjv3mv97fb+4fmr/f5Gn0nRPb3cn8/sainmA6a1Yk+Onk0OZnElNJrUIEylDRjrjEyF - XLVgSH0+rmUGZhazNwct08BBN9uegZqPBpQqpmebItzsZ0DcE66UrZfLRVh2F597gSKdxEZTEUkX - mkRaYdTe7waD7KzGe2hdLaVOa1E1oM1mPiZrgTdBkV8Ersezfrv8uEm98J6jfz1FOM3QtWOedXaY - Fjv0+2FFHpGAolUtG3pcpRcFj8xpn3m4U5I9jR2I1wrI0aSIzCU0UKJsx2MSA2aB6/+t//DB+6UX - zGDvhimBKfjYMCE8uJSzLWLJCRIwKdedNSxCnlAB3ygQGoh7vCIaF8hABx8JK2IzjKAF9h98maGJ - XEGxERYoSEVPb/t/wjlgAi4+tTSapxGE/1d/1f8Fs5efT1MGAAA= + H4sIAAAAAAAAA41Uy27bMBC85ysEnevIstS48C0oAgS9NAjaAmlRCGuShYhIpMNHW9fQv3dpSzIt + qmEvOuzODLmzIx6ukiQlVhvZMqXTTfINC0lyOH6xJaBlWBW2ad4MtYaLZwcdQAjT0ioyBWKdMm24 + AMOl6FV6kW5UszsKhtEKDCLS1TIvF8v1Ypl/yt9uynJTFNfvinx5s/6ajhSiWISyzlc3pU+hclu1 + Uph6Ogyn7tj3n8u7p+LpVjw+soeP/KX+8vBL/Plwfz5zV0sxHTCtFfvh6NnoYBZXQqNJDcJU2oCx + zshUyEULhtTn41pmYGIxe3HQIg0cdLPtGajpaECpYnqyKcLNfgLEPeFK2Wq+nIdld/GpFyiyk9ho + KiLpTJNIK4za+91gkK3VeA+tq7nUaS2qBrQpp2OyFngTFPlF4Do867vLj5vUC+85+tdjhNMMXTvm + WWeHcbF9v+tX5BEJKFrVsqHHVXpR8MicdpmHOyXZ09iCeK6AHE2KyFxCAyXKtjwm0WNmuP7f+g8f + vF96xgz22zAlMAX/N0wIDy7lbItYcoIETMr1zhoWIY+ogG8UCA3EPV4RjQtkoIOPhBWxGQbQDPsn + vszQRK6g2AALFKSip7f9lXD2mICLTy2N5mkA4f/VXXV/AWr/a3hTBgAA headers: content-encoding: [gzip] - content-length: ['494'] + content-length: ['498'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU3CxhsF9DKgEuHqdgc1pfjD/cards?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU4EY3YAnRRePOiqhVPwnzJH/cards?limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA6VU227bMAx971cYethTm1i+LHGAYsiSrtetXdsNWIfBkC050WrLriQHyYr8+yTZ - jp00xYYtDwZCiuQhzyGfDywLxIhjAUbWd/XHsp7NV5lTyh61uTHol6WQeUa4soLJF3eynIsPwfRy - dlKePeFZDIvk5xTU8evDJlFC2YzwglMmdWBAkBO5cBD5Lhy6iY8CN0KOi/zAQ3Y0RHbiKDtBQRy7 - 7pDYwVtv4PsxDnAygFEQgE3ieLEIORFlqvOyMk03HlZmUQVz2fl5njdso9FChEUuJErDDMl4vpuD - LAvKkaQ5C7OcSe2HzqZCRiTSw2nbpNiMZeJOP1/7Dx9vLnxUZBdnzuSbf5r86qBGksxyvtKvczlX - MDdJ5aog2hxzgqncbnQvxgixx5ChzERNbk+m5/fW+PT2fHJ9dW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d01tPICrDaC9u0 + zb5AdxAiwsMlMJISUPPdKqAEuV/OClOjibGR4ox3qBYMUpkIDfUWD/9Cfgz+yKErOXQc37mvF3kt + B/RdNYRaxeuJoQxzLYJhexNk7VcuQg3tXUZyIo4t802RphzEsdmIBFF42l5g1DXVHJx/T66rSqBW + wwqqq0tLaygZLElRKYl23CJRyMOg4moyUUrY/zcsR6fvxc5trS/wICG8rAQoIC2dz5rVAUnWw423 + AVR7+he5R0UT13rX7aibIJk0XBSZvvp7SqlXjX+rmF6LV2Ian+rwYP0b8YzZnFcGAAA= headers: content-encoding: [gzip] - content-length: ['676'] + content-length: ['677'] content-type: [application/json] status: {code: 200, message: OK} - request: body: '{"amount": 1061, "description": "whatever username"}' headers: {} method: POST - uri: https://api.balancedpayments.com:443/cards/CC3DQO5ZMPJ5apmJH2CY5Gfz/debits + uri: https://api.balancedpayments.com:443/cards/CC4FZsgPsRQlCDpQ75K0PC17/debits response: body: {string: !!python/unicode "{\n \"errors\": [\n {\n \"status\": \"Payment Required\",\n \"category_code\": \"card-declined\",\n \"additional\": \"Account Frozen\",\n \"status_code\": 402,\n \"category_type\": - \"banking\",\n \"extras\": {},\n \"request_id\": \"OHM78c3ee8a011311e4a4e806429171ffad\",\n - \ \"description\": \"R758: Account Frozen. Your request id is OHM78c3ee8a011311e4a4e806429171ffad.\"\n + \"banking\",\n \"extras\": {},\n \"request_id\": \"OHM9b39af72013611e4b7da06429171ffad\",\n + \ \"description\": \"R758: Account Frozen. Your request id is OHM9b39af72013611e4b7da06429171ffad.\"\n \ }\n ],\n \"links\": {\n \"debits.customer\": \"/customers/{debits.customer}\",\n \ \"debits.dispute\": \"/disputes/{debits.dispute}\",\n \"debits.source\": \"/resources/{debits.source}\",\n \"debits.order\": \"/orders/{debits.order}\",\n \ \"debits.refunds\": \"/debits/{debits.id}/refunds\",\n \"debits.events\": \"/debits/{debits.id}/events\"\n },\n \"debits\": [\n {\n \"status\": \"failed\",\n \"description\": \"whatever username\",\n \"links\": - {\n \"customer\": \"CU3CxhsF9DKgEuHqdgc1pfjD\",\n \"source\": - \"CC3DQO5ZMPJ5apmJH2CY5Gfz\",\n \"order\": null,\n \"dispute\": - null\n },\n \"updated_at\": \"2014-07-01T11:33:07.337495Z\",\n \"created_at\": - \"2014-07-01T11:33:07.058857Z\",\n \"transaction_number\": \"W137-025-4334\",\n + {\n \"customer\": \"CU4EY3YAnRRePOiqhVPwnzJH\",\n \"source\": + \"CC4FZsgPsRQlCDpQ75K0PC17\",\n \"order\": null,\n \"dispute\": + null\n },\n \"updated_at\": \"2014-07-01T15:44:37.542581Z\",\n \"created_at\": + \"2014-07-01T15:44:37.270803Z\",\n \"transaction_number\": \"W081-671-9798\",\n \ \"failure_reason\": \"R758: Account Frozen.\",\n \"currency\": \"USD\",\n \"amount\": 1061,\n \"failure_reason_code\": \"card-declined\",\n - \ \"meta\": {},\n \"href\": \"/debits/WD3FVZLdNCGAUQ0VtJ2htxRn\",\n - \ \"appears_on_statement_as\": \"BAL*example.com\",\n \"id\": \"WD3FVZLdNCGAUQ0VtJ2htxRn\"\n + \ \"meta\": {},\n \"href\": \"/debits/WD4IXVOElpbeHACesZUPkr09\",\n + \ \"appears_on_statement_as\": \"BAL*example.com\",\n \"id\": \"WD4IXVOElpbeHACesZUPkr09\"\n \ }\n ]\n}"} headers: content-length: ['1426'] @@ -252,9 +252,9 @@ interactions: response: body: {string: !!python/unicode "{\n \"customers\": [\n {\n \"name\": null,\n \"links\": {\n \"source\": null,\n \"destination\": - null\n },\n \"updated_at\": \"2014-07-01T11:33:07.979850Z\",\n \"created_at\": - \"2014-07-01T11:33:07.864901Z\",\n \"dob_month\": null,\n \"id\": - \"CU3GPWAhne1hO9gpoRn8fOS1\",\n \"phone\": null,\n \"href\": \"/customers/CU3GPWAhne1hO9gpoRn8fOS1\",\n + null\n },\n \"updated_at\": \"2014-07-01T15:44:38.120756Z\",\n \"created_at\": + \"2014-07-01T15:44:38.013455Z\",\n \"dob_month\": null,\n \"id\": + \"CU4JOi5FNtTIATtNhChk2T8Z\",\n \"phone\": null,\n \"href\": \"/customers/CU4JOi5FNtTIATtNhChk2T8Z\",\n \ \"merchant_status\": \"no-match\",\n \"meta\": {\n \"seq\": \"4\"\n },\n \"dob_year\": null,\n \"address\": {\n \"city\": null,\n \"line2\": null,\n \"line1\": null,\n \"state\": @@ -286,16 +286,16 @@ interactions: \ \"customer\": null\n },\n \"fingerprint\": \"1e2c425a579a1c7f27a037f0662b855035ceadbff18a0adbe785fb07e2afe1cc\",\n \ \"cvv_result\": null,\n \"number\": \"xxxxxxxxxxxx4242\",\n \"avs_postal_match\": null,\n \"expiration_month\": 12,\n \"meta\": {},\n \"id\": - \"CC3HTH0bkqdVstmShNmjWL8V\",\n \"category\": \"other\",\n \"type\": + \"CC4L2Pd5dVpoGgLm6cVV32AJ\",\n \"category\": \"other\",\n \"type\": \"credit\",\n \"cvv_match\": null,\n \"bank_name\": \"\",\n \"avs_street_match\": - null,\n \"brand\": \"Visa\",\n \"updated_at\": \"2014-07-01T11:33:08.809298Z\",\n + null,\n \"brand\": \"Visa\",\n \"updated_at\": \"2014-07-01T15:44:39.117159Z\",\n \ \"address\": {\n \"city\": null,\n \"line2\": null,\n \ \"line1\": null,\n \"state\": null,\n \"postal_code\": null,\n \"country_code\": null\n },\n \"can_debit\": true,\n \ \"name\": null,\n \"expiration_year\": 2020,\n \"cvv\": null,\n \ \"is_verified\": true,\n \"avs_result\": null,\n \"can_credit\": - false,\n \"href\": \"/cards/CC3HTH0bkqdVstmShNmjWL8V\",\n \"created_at\": - \"2014-07-01T11:33:08.809295Z\"\n }\n ],\n \"links\": {\n \"cards.card_holds\": + false,\n \"href\": \"/cards/CC4L2Pd5dVpoGgLm6cVV32AJ\",\n \"created_at\": + \"2014-07-01T15:44:39.117156Z\"\n }\n ],\n \"links\": {\n \"cards.card_holds\": \"/cards/{cards.id}/card_holds\",\n \"cards.customer\": \"/customers/{cards.customer}\",\n \ \"cards.disputes\": \"/cards/{cards.id}/disputes\",\n \"cards.debits\": \"/cards/{cards.id}/debits\"\n }\n}"} @@ -307,34 +307,34 @@ interactions: content-type: [application/json] status: {code: 201, message: CREATED} - request: - body: '{"links": {"customer": "/customers/CU3GPWAhne1hO9gpoRn8fOS1"}, "cvv_result": + body: '{"links": {"customer": "/customers/CU4JOi5FNtTIATtNhChk2T8Z"}, "cvv_result": null, "number": "xxxxxxxxxxxx4242", "expiration_month": 12, "meta": {}, "id": - "CC3HTH0bkqdVstmShNmjWL8V", "category": "other", "is_verified": true, "type": + "CC4L2Pd5dVpoGgLm6cVV32AJ", "category": "other", "is_verified": true, "type": "credit", "cvv_match": null, "bank_name": "", "avs_street_match": null, "brand": - "Visa", "updated_at": "2014-07-01T11:33:08.809298Z", "fingerprint": "1e2c425a579a1c7f27a037f0662b855035ceadbff18a0adbe785fb07e2afe1cc", + "Visa", "updated_at": "2014-07-01T15:44:39.117159Z", "fingerprint": "1e2c425a579a1c7f27a037f0662b855035ceadbff18a0adbe785fb07e2afe1cc", "can_debit": true, "name": null, "expiration_year": 2020, "can_credit": false, - "avs_postal_match": null, "avs_result": null, "cvv": null, "created_at": "2014-07-01T11:33:08.809295Z", + "avs_postal_match": null, "avs_result": null, "cvv": null, "created_at": "2014-07-01T15:44:39.117156Z", "address": {"city": null, "line2": null, "line1": null, "state": null, "postal_code": null, "country_code": null}}' headers: {} method: PUT - uri: https://api.balancedpayments.com:443/cards/CC3HTH0bkqdVstmShNmjWL8V + uri: https://api.balancedpayments.com:443/cards/CC4L2Pd5dVpoGgLm6cVV32AJ response: body: string: !!binary | - H4sIAAAAAAAAA41U32+bMBB+71+BeF4T24RC8jb1YX2Y1mntWqnVhIx9BC9gmG2iRhH/+2x+JCRN - p/GA4M7f3Xd3n29/5Xk+o4prf+W92h/P23dvay6E3DjzaHAnG22qEpS1+rc/gy/fnz/nEnB+v1zX - 1Q8ZZ/cP2B/w7acxUCbkGlSthDQOiIGwBQlpGC0pZlFGIoqCKEM3NySNwxAFIQPK0yzD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KjqB5AkHu9+rBtZv991qOXWSb5yEZGpklUpITCF33hzS+X+4 + S8I/NEQoRMGyO6e1WdAfO9DNcW8vhZntGqVF1twPPYlLw2XGWd2w6vLtVnrc5KKY97eGmnfIPlB3 + PupAjKuy0vBJqyF71aiR8jNEmzPD1Q/1X+Fd3UjqBAAA headers: content-encoding: [gzip] - content-length: ['550'] + content-length: ['546'] content-type: [application/json] status: {code: 200, message: OK} - request: @@ -348,16 +348,16 @@ interactions: \ \"customer\": null\n },\n \"fingerprint\": \"d34d613121ae61ae732d86eaf09929617bd3f5ccc60f7364d32ae1afc5f81745\",\n \ \"cvv_result\": null,\n \"number\": \"xxxxxxxxxxxx4242\",\n \"avs_postal_match\": null,\n \"expiration_month\": 12,\n \"meta\": {},\n \"id\": - \"CC3J5cFlr9RfnD3ztsdDa3xf\",\n \"category\": \"other\",\n \"type\": + \"CC4MOdbG69Yqk2AzU5zkwHdD\",\n \"category\": \"other\",\n \"type\": \"credit\",\n \"cvv_match\": null,\n \"bank_name\": \"\",\n \"avs_street_match\": - null,\n \"brand\": \"Visa\",\n \"updated_at\": \"2014-07-01T11:33:09.854875Z\",\n + null,\n \"brand\": \"Visa\",\n \"updated_at\": \"2014-07-01T15:44:40.681317Z\",\n \ \"address\": {\n \"city\": null,\n \"line2\": null,\n \ \"line1\": null,\n \"state\": null,\n \"postal_code\": null,\n \"country_code\": null\n },\n \"can_debit\": true,\n \ \"name\": null,\n \"expiration_year\": 2030,\n \"cvv\": null,\n \ \"is_verified\": true,\n \"avs_result\": null,\n \"can_credit\": - false,\n \"href\": \"/cards/CC3J5cFlr9RfnD3ztsdDa3xf\",\n \"created_at\": - \"2014-07-01T11:33:09.854872Z\"\n }\n ],\n \"links\": {\n \"cards.card_holds\": + false,\n \"href\": \"/cards/CC4MOdbG69Yqk2AzU5zkwHdD\",\n \"created_at\": + \"2014-07-01T15:44:40.681315Z\"\n }\n ],\n \"links\": {\n \"cards.card_holds\": \"/cards/{cards.id}/card_holds\",\n \"cards.customer\": \"/customers/{cards.customer}\",\n \ \"cards.disputes\": \"/cards/{cards.id}/disputes\",\n \"cards.debits\": \"/cards/{cards.id}/debits\"\n }\n}"} @@ -369,83 +369,83 @@ interactions: content-type: [application/json] status: {code: 201, message: CREATED} - request: - body: '{"links": {"customer": "/customers/CU3GPWAhne1hO9gpoRn8fOS1"}, "cvv_result": + body: '{"links": {"customer": "/customers/CU4JOi5FNtTIATtNhChk2T8Z"}, "cvv_result": null, "number": "xxxxxxxxxxxx4242", "expiration_month": 12, "meta": {}, "id": - "CC3J5cFlr9RfnD3ztsdDa3xf", "category": "other", "is_verified": true, "type": + "CC4MOdbG69Yqk2AzU5zkwHdD", "category": "other", "is_verified": true, "type": "credit", "cvv_match": null, "bank_name": "", "avs_street_match": null, "brand": - "Visa", "updated_at": "2014-07-01T11:33:09.854875Z", "fingerprint": "d34d613121ae61ae732d86eaf09929617bd3f5ccc60f7364d32ae1afc5f81745", + "Visa", "updated_at": "2014-07-01T15:44:40.681317Z", "fingerprint": "d34d613121ae61ae732d86eaf09929617bd3f5ccc60f7364d32ae1afc5f81745", "can_debit": true, "name": null, "expiration_year": 2030, "can_credit": false, - "avs_postal_match": null, "avs_result": null, "cvv": null, "created_at": "2014-07-01T11:33:09.854872Z", + "avs_postal_match": null, "avs_result": null, "cvv": null, "created_at": "2014-07-01T15:44:40.681315Z", "address": {"city": null, "line2": null, "line1": null, "state": null, "postal_code": null, "country_code": null}}' headers: {} method: PUT - uri: https://api.balancedpayments.com:443/cards/CC3J5cFlr9RfnD3ztsdDa3xf + uri: https://api.balancedpayments.com:443/cards/CC4MOdbG69Yqk2AzU5zkwHdD response: body: string: !!binary | - H4sIAAAAAAAAA41U227bMAx971cYfl4TS3J8ydvQYgP20qG7FOgwGIpExUJt2ZDlIFnhf5/kS+Kk - 6TADNmBShzwkj/h643k+o5o3/tr7ZX8877X/WnMh1YszTwZ3sm1MVYK2Vv/uB/n89eljrgDlD+m2 - rh5VIh6+IX/Edx+mQEKqLehaS2UckJOQR4ggjChE9o0J5kkEVARpitMIxRtOxIoxFgUiJlHICaaA - qGArkaA4XPnHwGy3yzQ0beHiqrYojh7VlpuB5n72hDjEJzTdNVldNYYWWUkNyy9jwL6WmhpZqays - lHF+hI8ZSjDUNedUpuR9W+7IlxX7VOj0Uah78sc0/J6SvZixpga2lT6405XJLc1jUHOowZmZBi7N - eaFXOW6oeskULXvUeWmN0QDmemkbTVXP9qds6AnW1txy4xnt54QDFN4G8W2AviO0JmSNggWOEozC - 51kmzu0ELmUijatuPpFBT4Cvm9Fbs52LcVVdBBkHxip+xcmqVhl9yGbeN2JkVGUcNra7a8/oFk6S - Gbp4JqOZBA5AnexxQIK5/i4Y+rLJdqClkOD6e5bA6e26Wh2nceRrT9CiObHKNQgbyF/2l3T5H+rS - 8K8ZBukiWYVJjJ+He9rZBv12BV1c92EpLFzWLK+Kfj9MJF57LgvJu57V6B+6MuFmi2I5bY1mOSIn - QzfqaARx2dStgXdSHb1nifpRvocYfLa47qb7C+9XDG3qBAAA + H4sIAAAAAAAAA41U226jMBB971cgntsEG0Mub1VWe5O2fUlX2q5WyNimWAHD2ibbNOLfaxtISJpW + GylIzHBmzsw59v7K83yCJVX+0vttXjxv754mXHCxseEhYL9slK5KJk3UXz2g7/c8+nyn199u1/ou + X+UbuJ4/+j2+vR4KZVw8MVlLLrQF0hDRGIQAAsxi85+FkM5jhrNgsYCLGMxSGmYRISQOslkYIxpC + zADOSJTNwQxF/qEw2W4TyVRT2LqiKYpDRjRl2tF8Hv0QRPCIxluV1JXSuEhKrEl+XoM911xizSuR + lJXQNg/goUPJNLbLOY7JqVvLCv24p+mXePHr7wbevjxEL5t/X+mnEWus2VMld/brSueG5qGo3tXM + holklOvTQS9yTLHYJAKXDnU6mtKSMX15tFRi4dj+5AofYU1NDTeaYKcTDAC6CWY3AViDaInQEoGJ + EW2OosdRJ0qNAuc24dpON1ak8xODl8Pgbdjoou1UZ0V6wUhFLyRJ1Qgtd8ko+8aMBIuEstRsd+lp + 2bCjZbotnthoZIEdw9b2MAiDsf/OGPpcJVsmecaZ3e9JA+u3y261nHrJl16GC3VklUuWmUL+1B3S + 6X+4S7IPNQwm8dwcPqOhW01rnn/sQGfHvbsUJrZrkleFux8GEnvHZcJp61j1+W4rA250UUyHW0NN + e+QQaHsf9SDKVd1o9k6rQ/akkZPyPUSXM8O1V+0rTJM7KOoEAAA= headers: content-encoding: [gzip] - content-length: ['549'] + content-length: ['551'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU3GPWAhne1hO9gpoRn8fOS1 + uri: https://api.balancedpayments.com:443/customers/CU4JOi5FNtTIATtNhChk2T8Z response: body: string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnetIit36cSt66DFBHyjQohBochMRkUiFpIoahv69S1uSaVIN - c9Fhd2bInR3xeJMkKe20kQ0one6SX1hIkuPpiy1BGsCq6Or63ViruXi20BGEMC07RX0g1hlowwUx - XIpBZRDpJ7WuZcQAK4lBRHqXF6tFvl7kxbei2C2Xu3x9u11vN+/zn+lEoQoilM2H1TYvHAqT+7KR - wlT+MJzZYz99X35++PGxElBU99unVn4Rm8f7r8XlzLaSwh8wrRQ8Wno2OZjFldBoWhFhSm2I6ayR - qZCLhhhaXY5rwBDPYnix0FUaOGhnOwBR/miEMQXa2xTl5uABcU+4UribLxdh2V7c9wJFWomNuqSS - zTSp7IRRB7cbDLLvNN5D63IudVqLsibarPwxoSG8Dor8KnA9nvXb5sdO6oT3Ev3bKcJphq6d8qyz - 47TYod8PK3KIlChWVrJmp1U6UXDInPWZgzsn2dHYE/FcEnoyKSJzDQ2UGOx5TGLAzHDdv/U/Pji/ - 9IwZ8NeAEpiCtw0TwoNLWdsilpwhAZNx3XYGIuQJFfCNIkITah+viMYVMtDBR6ITsRlG0Az7D77M - pI5cQcEICxSkYue3/ZVwDpiAi08ti+ZpBOH/1d/0/wC0V4mPUwYAAA== + H4sIAAAAAAAAA41UsW7bMBDd8xWC5jqSHKkJvBUBCrRDurhLgkKgSRYiLJEueSpqGPr3Hm1JoUkl + zKLh+N4T793jnW6SJKW9AdVxbdJN8oKFJDmdv3gkScexKvu2/TTVWiH3FjqBEGZUr6kPxDrjBoQk + IJQcVUaRYVbrD4wAZzUBRKTrvChX+f0qL7ZFtSnLzd3DbbHO76vPz+lMoZpHKHlxV1aVQ2FqV3dK + QuM3I5j97ePP8vsPUX19gu23L1t4ah6b/Xr74AgcGiX9BtNG89+Wns0OZnElNJo2REJtgEBvjUyl + WnUEaPPaYseBeBbzPxZapoGDtrcjJ9pvjTCmufEmRQUcPSDOCUfK18vlIizbi/teoMhB4UFbU8UW + DqnqJeijexo0susN3sOYeil1xsi6JQZKv03eEdEGRXEVuAH/9cvmx3bqhPc1+rdzhNMMXTvn2WSn + ebDj+TCOyCFSolndqJadR+lEwSELNmQO7pJkR2NH5L4m9GxSROYaGigxvhMxiRGzwHVf6xs+OE96 + wQz+D7iWmIKPNRPCg0tZ2yKWXCABkwlz6IFHyDMq4IMm0hBql1dE4woZ6OCS6GWshwm0wP6Lm5m0 + kStoPsECBaXZZbe/E84RE3Bx1bJoniYQvq/hZvgPbDJrDlMGAAA= headers: content-encoding: [gzip] - content-length: ['496'] + content-length: ['494'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU3GPWAhne1hO9gpoRn8fOS1/cards?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU4JOi5FNtTIATtNhChk2T8Z/cards?limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA+VWW2vbMBR+768IftjTmkjyNYEyRstWxlhH27XQMYysS6PVlj1ZDslK/vskXxIn - ddexMQpbIME5x+foXL7zHd0fjEYOwYqWzmz02fwZje7rXyNOhbyz4k5g36xKnWdMGalz/Ml9+/H6 - 9VwyOD+b3hb5uYz42QV0Wvv1y84RF/KWqUIJqa0hdT0aQBciiFlgvqGLaBQwzMF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UwXi1jxqk6t37xO040mr7OkhXnb+3jIQ1trsqjisqg0SeOMaDrb + 98FvS6mIlkUeZ0WurR6izQkZ18QmZxumZE1azrz36CPDbFoW5zfvM59Opy46veihJprfFGpp3y70 + zMDcONXLklsxVZxJvRvoQYwJyedxTrLGaje0SivO9eHQEkXyBu1UVmRrVpfMYGMxaeqEAPSOQXAM + 4ATiseeN3WgYRC6CpsYbxIQxU4F9mkhto+tXpOUTR4fF8KHY1EXbqPacdAWjBTugpEWda7WMe9oH + ZKQkjxlPTHbHA61qvqVMm8UdGvUosOTE0h4BBPr820PoyCpecCWF5Da/OwdYvh1mq8XUlXw8ECSt + tqhmigvjyBk1TTr6BXYp/kQNIQwg9rs+7ej715ueuR7zoQsRJNw338BFLPQ5ESCKUOTDIGGuwJRS + H4jA9T3mIsIhERSLEAYe3u2Fw2l81qb/cMWScz/69G2OTu+u8d38+1v2+h9oeg8OTdFCD//XTe8+ + c9M/xa6fN70Hhn5oms/UsJmHK/P8aqeYs95ijdhJSdVM/tF6z5uB88iWb+fRq1RmUp9A8KIQouL6 + BHSMd3J+u7uUne0k6y4Rv++8OdUAhV1VnPZ0I1kLSsUXsqjtXtoOdEcXZtnbId5OcEdI9ecBm9Q1 + Q3TvvtTeqob9G1MvrffNON9oV+u0tWImq7LW3KJfD/7OQLLVaKPtouhcGYfxrEibm9wBK/tWp9+x + a3bhIzadzkZ4tPoBSH6ovisKAAA= headers: content-encoding: [gzip] - content-length: ['758'] + content-length: ['761'] content-type: [application/json] status: {code: 200, message: OK} - request: @@ -456,9 +456,9 @@ interactions: response: body: {string: !!python/unicode "{\n \"customers\": [\n {\n \"name\": null,\n \"links\": {\n \"source\": null,\n \"destination\": - null\n },\n \"updated_at\": \"2014-07-01T11:33:11.757331Z\",\n \"created_at\": - \"2014-07-01T11:33:11.640235Z\",\n \"dob_month\": null,\n \"id\": - \"CU3L5OJCUjErSojbUKCxEaGR\",\n \"phone\": null,\n \"href\": \"/customers/CU3L5OJCUjErSojbUKCxEaGR\",\n + null\n },\n \"updated_at\": \"2014-07-01T15:44:42.971621Z\",\n \"created_at\": + \"2014-07-01T15:44:42.833241Z\",\n \"dob_month\": null,\n \"id\": + \"CU4Peo8BtJifohKDry4aff4Z\",\n \"phone\": null,\n \"href\": \"/customers/CU4Peo8BtJifohKDry4aff4Z\",\n \ \"merchant_status\": \"no-match\",\n \"meta\": {\n \"seq\": \"5\"\n },\n \"dob_year\": null,\n \"address\": {\n \"city\": null,\n \"line2\": null,\n \"line1\": null,\n \"state\": @@ -483,35 +483,35 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU3L5OJCUjErSojbUKCxEaGR + uri: https://api.balancedpayments.com:443/customers/CU4Peo8BtJifohKDry4aff4Z response: body: string: !!binary | - H4sIAAAAAAAAA41UwY7TMBC971dEOdNN07RU6rVaIQESEtALCEUT2yjeTexiO2irKv/OuE1S1w6Y - Sw4z7z173rz4/JAkKem0kS1TOt0l37GQJOfLF1sCWoZV0TXNm7HWcPFioSMIYVp2ivhArFOmDRdg - uBSDyiDST2rdkYJhtASDiHS1zNeL5XaxzL/m+a4odnn+uN1siyL/lk4UoliE8na9XBUbh0JlVbZS - mNofhlN77P5QfNx8er8/PD+pL/K5OnzYvz7Bu8+3M4+1FP6Aaa3YT0vPJgezuBIaTWoQptQGTGeN - TIVctGBIfTuuZQY8i9kvC92kgYN2thMD5Y8GlCqmvU0Rbk4eEPeEK2Wr+XIelu3FfS9Q5Cix0ZRE - 0pkmkZ0w6uR2g0GqTuM9tC7nUqe1KBvQZu2PyVrgTVDkd4Hr8awfNj92Uie8t+g/ThFOM3Ttkmed - nafFDv1+WJFDJKBoWcuGXlbpRMEhc9pnDu6aZEejAvFSArmYFJG5hwZKlFU8JjFgZrju3/oXH5xf - esYM9mqYEpiC/xsmhAeXsrZFLLlCAibl+tgZFiFPqIBvFAgNxD5eEY07ZKCDj0QnYjOMoBn2b3yZ - oYlcQbERFihIRa9v+z/COWACLj61NJqnEYT/V//Q/wEveU2HUwYAAA== + H4sIAAAAAAAAA41UsW7bMBDd8xWC5jqyFKZJPaadkiVDu7QohDNJQ0Qk0iWpoIahf+/RlhSaVMos + Go7vPfHePd7xKsty2hurOq5Nvsl+YSHLjqcvHknoOFZl37afplor5IuDTiCEGdVrGgKxzrixQoIV + So4qo8gwq/V7BpazGiwi8mpdktX6brUuv5e3G0I2pLr+cld+rsqf+Uyhmico9zc3FfEpTG3rTknb + hM0I5n779Qd55ur+wT6KnWqevukDgd2OeP/cN0qGDeaN5jtHL2YHi7QSGk0bkLY2FmzvjMylWnVg + afPWYsctBBbzPw56m0cOut4OHHTYGjCmuQkmRYU9BECcE46UV8vlMi67i4deoMhe4UFbU8UWDqnq + pdUH/zRqZNsbvIcx9VLqjJF1C8aSsE3egWijorgI3ID/+u3y4zr1wvsW/es5wnmBrp3ybIrjPNjx + fBhH5BEpaFY3qmWnUXpR8MiCDYWHOyfZ09iCfKmBnkxKyFxCIyXGtyIlMWIWuP5rfccH70kvmMH/ + Wq4lpuBjzcTw6FLOtoQlZ0jEZMLse8sT5BkV8a0GaYC65ZXQuEBGOrgkepnqYQItsF9xM0ObuILm + EyxSUJqdd/t/wjliIi6uWpbM0wTC9zVcDf8AHOi05VMGAAA= headers: content-encoding: [gzip] - content-length: ['496'] + content-length: ['491'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU3L5OJCUjErSojbUKCxEaGR/cards?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU4Peo8BtJifohKDry4aff4Z/cards?limit=10&offset=0 response: body: {string: !!python/unicode "{\n \"cards\": [],\n \"meta\": {\n \"last\": - \"/customers/CU3L5OJCUjErSojbUKCxEaGR/cards?limit=10&offset=0\",\n \"next\": - null,\n \"href\": \"/customers/CU3L5OJCUjErSojbUKCxEaGR/cards?limit=10&offset=0\",\n + \"/customers/CU4Peo8BtJifohKDry4aff4Z/cards?limit=10&offset=0\",\n \"next\": + null,\n \"href\": \"/customers/CU4Peo8BtJifohKDry4aff4Z/cards?limit=10&offset=0\",\n \ \"limit\": 10,\n \"offset\": 0,\n \"previous\": null,\n \"total\": - 0,\n \"first\": \"/customers/CU3L5OJCUjErSojbUKCxEaGR/cards?limit=10&offset=0\"\n + 0,\n \"first\": \"/customers/CU4Peo8BtJifohKDry4aff4Z/cards?limit=10&offset=0\"\n \ },\n \"links\": {}\n}"} headers: content-length: ['364'] @@ -521,46 +521,46 @@ interactions: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd response: body: string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIkp028NXtJbcU6aEtCmFNshURiXT4CGIY+vcubUmmSaXs - RYfdmSF3dsTjTZblxGojO6Z0vsl+YiHLjqcvtgR0DKvCtu2HsdZy8eygIwhhWlpFQiDWKdOGCzBc - ikFlEOknNbunYBitwSAir5blerH8tFiWT2W5WVWbqrpd35X398sf+UQhiiUoq2p993HlUajc1Z0U - pgmH4dQdu/1Wfd3yPw/bl8fP9PvjF/LUvK4e3tTlzH0jRThg3ij229GLycEirYRGkwaEqbUBY52R - uZCLDgxpLsd1zEBgMXtx0DKPHHSzHRiocDSgVDEdbIpwcwiAuCdcKavmy2VcdhcPvUCRvcRGWxNJ - Z5pEWmHUwe9Gg+ysxntoXc+lTmtRt6DNOhyTdcDbqMivAtfjWb9cftykXngv0b+dIpwX6Nopz7o4 - Tosd+v2wIo9IQNG6kS09rdKLgkfmtC883DnJnsYOxHMN5GRSQuYaGilRtuMpiQEzw/X/1nd88H7p - GTPYm2FKYAr+b5gYHl3K2Zaw5AyJmJTrvTUsQZ5QEd8oEBqIe7wSGlfISAcfCStSM4ygGfYrvszQ - Jq6g2AiLFKSi57f9H+EcMBEXn1qazNMIwv+rv+n/AoxtLhJTBgAA + H4sIAAAAAAAAA41Uy27bMBC85ysEnWvLipQ29i1oby2CAG3RokUh0CQLEZFIhY+ggqF/79KWZJpU + wlx02J0ZcmdHPFwlSYqN0qKlUqW75DcUkuRw/EKLo5ZClZumeTfVGsYfLXQCAUwJI7EPhDqhSjOO + NBN8VBlFhlnNdARpSiqkAZFeb/Jytfmw2uTf8ptdWezKcp0Xxfvb7a90pmBJX6UU622+uSlKh0LE + vmoF17U/DCP22I/fi88/Sf98//UT7b88FN3dD7mtn8j5zK4W3B8wrSX9a+nZ7GAWVwKjcY24rpRG + 2lgjUy5WLdK4Ph/XUo08i+mTheZp4KCdradI+qMhQiRV3qYw070HhD3BSun1cjkPy/bivhcg0glo + NBUWZKGJheFa9m43GGRvFNxDqWopdUrxqkFKl/6YtEWsCYrsInADnPXH5sdO6oT3HP31HOE0A9eO + eVbZYV7s2B/GFTlEjCSpatGQ4yqdKDhkRobMwZ2S7GjsEX+sED6aFJG5hAZKhO5ZTGLELHDdv/UF + H5xfesEM+k9TySEFbxsmhAeXsrZFLDlBAiZhqjOaRsgzKuBribhC2D5eEY0LZKADj4ThsRkm0AL7 + GV5m1ESuIOkECxSEJKe3/ZVwjpiAC08tieZpAsH/NVwN/wHQiK4AUwYAAA== headers: content-encoding: [gzip] - content-length: ['495'] + content-length: ['499'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/cards?limit=10&offset=0 + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA6VVyW7bMBC95ysIHXpKbIlyvAFB4ThBigRx9gJNUQg0F5uITDok5dgI/O8lKcmS - sqBFy4MAzcKZefNm+LoHQICRIjoYgp/2B4BX/7XilIsnJy4FzjLTRi6ostJg/ABvx3x2Pn6+OSE/ - bk7x/XwVn69VUPhv98uLGBczqpaKC+Mc+7jHwg6M4+4hYv0+jmncxSyEvU6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fpXsPz9bIsc9t6AvM03mij4kwojdJ4jXSysrVx0ejJ + NmMSaSZ4vBZcW33g7zOsiUZdcCR5MLYOGsFpruxHbW6xY7qItfjlLNoKhLFpQsWhVZyILQhfQsiw + i3sK52cn6i7anKELqPKLW3xzu7yctBBBmjwIWVhroVcGgn3BusiIFSeSYKa7INb9dzBcIv4Yc7R2 + Xp+v5pdfPs0W4PRsdv0RnMwW54dg0Zv1ungqLQnRDZ4FUY3BUiLu+rhlCjXiPMOmahwjx47QDwZH + /ujID26C4XQAp4NhbzwMQhjct1KVkBn7NjkNwEbS7qFkMbHIviIObD4TGcwR4+Dald4ejKGGds2/ + Os+KOonAzmbih4Hf9k5EzrUs4srA5n+xGQniMSZLM44p0DInDX9L2DvzaPGxIMjuYOiHDSHNMjxr + 02Mq3hDJKCMW9k4CS/796nhl76BiIjBjAmV7wFYPsABcaOBY0hq4rb5i0xRQlKqm/pUk1KLSd7el + /xfEleQPJBhEcBLA+3I3dgbKHxYtr7OHXoqUY1G/vlQm9xt3qiztfcrWTB8H/jtBqSL6uJ6hx8m2 + e1a8pqnqDP57cJfVFFofFK/MbiTVQL1Mkg0TuT3ADQs8Lcy5sn4lUzzK5P83bGB0x/rZxS//Cz3M + VJZrs8fNOJ/cVHsM7/p7bVVQqWn/J1qjqPxq7a5alyqRdY1XInX/opo5rVQtfSeZW6A3fCqd7fBg + 9xv4QHhu7QYAAA== headers: content-encoding: [gzip] content-length: ['751'] @@ -570,17 +570,17 @@ interactions: body: '{"amount": 1000, "description": "janet"}' headers: {} method: POST - uri: https://api.balancedpayments.com:443/cards/CC2SGPDNPBU0oOKbaes9tqC1/debits + uri: https://api.balancedpayments.com:443/cards/CC3MHBsW6vHaL3suLVdTVbO9/debits response: body: {string: !!python/unicode "{\n \"debits\": [\n {\n \"status\": \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"customer\": - \"CU2RCigJCqQDdYQEcThv3Jxr\",\n \"source\": \"CC2SGPDNPBU0oOKbaes9tqC1\",\n + \"CU3KXdyvNSDeyLP3pAWr9hqd\",\n \"source\": \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \ \"order\": null,\n \"dispute\": null\n },\n \"updated_at\": - \"2014-07-01T11:33:14.816252Z\",\n \"created_at\": \"2014-07-01T11:33:13.722996Z\",\n - \ \"transaction_number\": \"W840-430-2910\",\n \"failure_reason\": + \"2014-07-01T15:44:45.548561Z\",\n \"created_at\": \"2014-07-01T15:44:44.926318Z\",\n + \ \"transaction_number\": \"W260-348-1523\",\n \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": 1000,\n \"failure_reason_code\": - null,\n \"meta\": {},\n \"href\": \"/debits/WD3NqPJy6Kz9Xxn4NCgfjq1r\",\n - \ \"appears_on_statement_as\": \"BAL*example.com\",\n \"id\": \"WD3NqPJy6Kz9Xxn4NCgfjq1r\"\n + null,\n \"meta\": {},\n \"href\": \"/debits/WD4RA4ycTczpRdM0e3NHNYi5\",\n + \ \"appears_on_statement_as\": \"BAL*example.com\",\n \"id\": \"WD4RA4ycTczpRdM0e3NHNYi5\"\n \ }\n ],\n \"links\": {\n \"debits.customer\": \"/customers/{debits.customer}\",\n \ \"debits.dispute\": \"/disputes/{debits.dispute}\",\n \"debits.source\": \"/resources/{debits.source}\",\n \"debits.order\": \"/orders/{debits.order}\",\n diff --git a/tests/py/fixtures/TestClosing.yml b/tests/py/fixtures/TestClosing.yml index dce6759c81..1a84534319 100644 --- a/tests/py/fixtures/TestClosing.yml +++ b/tests/py/fixtures/TestClosing.yml @@ -1,17 +1,17 @@ interactions: - request: - body: '{"meta": {"seq": 6}}' + body: '{"meta": {"seq": 7}}' headers: {} method: POST uri: https://api.balancedpayments.com:443/customers response: body: {string: !!python/unicode "{\n \"customers\": [\n {\n \"name\": null,\n \"links\": {\n \"source\": null,\n \"destination\": - null\n },\n \"updated_at\": \"2014-07-01T11:33:23.610868Z\",\n \"created_at\": - \"2014-07-01T11:33:23.506527Z\",\n \"dob_month\": null,\n \"id\": - \"CU3Yrhw41eTJjqJBFTTVCXTr\",\n \"phone\": null,\n \"href\": \"/customers/CU3Yrhw41eTJjqJBFTTVCXTr\",\n + null\n },\n \"updated_at\": \"2014-08-06T16:11:13.542466Z\",\n \"created_at\": + \"2014-08-06T16:11:13.412450Z\",\n \"dob_month\": null,\n \"id\": + \"CU2eHRmBFee1y5mc84bVX2JW\",\n \"phone\": null,\n \"href\": \"/customers/CU2eHRmBFee1y5mc84bVX2JW\",\n \ \"merchant_status\": \"no-match\",\n \"meta\": {\n \"seq\": - \"6\"\n },\n \"dob_year\": null,\n \"address\": {\n \"city\": + \"7\"\n },\n \"dob_year\": null,\n \"address\": {\n \"city\": null,\n \"line2\": null,\n \"line1\": null,\n \"state\": null,\n \"postal_code\": null,\n \"country_code\": null\n },\n \ \"business_name\": null,\n \"ssn_last4\": null,\n \"email\": @@ -41,13 +41,13 @@ interactions: \"321174851\",\n \"bank_name\": \"SAN MATEO CREDIT UNION\",\n \"account_type\": \"checking\",\n \"name\": \"Alice G. Krebs\",\n \"links\": {\n \"customer\": null,\n \"bank_account_verification\": null\n },\n \"can_credit\": - true,\n \"created_at\": \"2014-07-01T11:33:24.291792Z\",\n \"fingerprint\": + true,\n \"created_at\": \"2014-08-06T16:11:14.584220Z\",\n \"fingerprint\": \"5f0ba9fa3f1122ef13b944a40abfe44e7eba9e16934e64200913cb4c402ace14\",\n \"updated_at\": - \"2014-07-01T11:33:24.291795Z\",\n \"href\": \"/bank_accounts/BA3ZjVKBXZkadShuLO55Gx0R\",\n + \"2014-08-06T16:11:14.584222Z\",\n \"href\": \"/bank_accounts/BA2g1fNaSsXFegYbFlUMItH7\",\n \ \"meta\": {},\n \"account_number\": \"xxxxxx0001\",\n \"address\": {\n \"city\": null,\n \"line2\": null,\n \"line1\": null,\n \ \"state\": null,\n \"postal_code\": null,\n \"country_code\": - null\n },\n \"can_debit\": false,\n \"id\": \"BA3ZjVKBXZkadShuLO55Gx0R\"\n + null\n },\n \"can_debit\": false,\n \"id\": \"BA2g1fNaSsXFegYbFlUMItH7\"\n \ }\n ],\n \"links\": {\n \"bank_accounts.credits\": \"/bank_accounts/{bank_accounts.id}/credits\",\n \ \"bank_accounts.bank_account_verifications\": \"/bank_accounts/{bank_accounts.id}/verifications\",\n \ \"bank_accounts.customer\": \"/customers/{bank_accounts.customer}\",\n @@ -64,99 +64,79 @@ interactions: - request: body: '{"routing_number": "321174851", "bank_name": "SAN MATEO CREDIT UNION", "account_type": "checking", "name": "Alice G. Krebs", "links": {"customer": - "/customers/CU3Yrhw41eTJjqJBFTTVCXTr"}, "can_credit": true, "created_at": "2014-07-01T11:33:24.291792Z", - "fingerprint": "5f0ba9fa3f1122ef13b944a40abfe44e7eba9e16934e64200913cb4c402ace14", - "updated_at": "2014-07-01T11:33:24.291795Z", "meta": {}, "account_number": "xxxxxx0001", + "/customers/CU2eHRmBFee1y5mc84bVX2JW"}, "can_credit": true, "created_at": "2014-08-06T16:11:14.584220Z", "address": {"city": null, "line2": null, "line1": null, "state": null, "postal_code": - null, "country_code": null}, "can_debit": false, "id": "BA3ZjVKBXZkadShuLO55Gx0R"}' + null, "country_code": null}, "updated_at": "2014-08-06T16:11:14.584222Z", "customer": + null, "meta": {}, "bank_account_verification": null, "fingerprint": "5f0ba9fa3f1122ef13b944a40abfe44e7eba9e16934e64200913cb4c402ace14", + "can_debit": false, "id": "BA2g1fNaSsXFegYbFlUMItH7", "account_number": "xxxxxx0001"}' headers: {} method: PUT - uri: https://api.balancedpayments.com:443/bank_accounts/BA3ZjVKBXZkadShuLO55Gx0R + uri: https://api.balancedpayments.com:443/bank_accounts/BA2g1fNaSsXFegYbFlUMItH7 response: body: string: !!binary | - H4sIAAAAAAAAA5VTW2+bMBR+769APK/BBlNK3pKsq9puidTSqss0IWMOixsCmTFdo4j/PkOgXJpq - HQ9+8Hc4/i7n7E80TQ9osvYpY2meyEwfaz/Upabtq1PBIs0lT375Sb4JQChct0yMHXJuY/1TU1T1 - SOgGSvxuMte+TbyLhTa7v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UFgYRsmJ9Qh9r6xlidkg4ayPlr + /Po6U1r76+t9qoHI42lwBqzGXh666NnoA/Cr5EMWZW30Iiide9OqqlOhz1+lplJNZ2z7i2edZqt0 + ZZjEsReMJYLCbopPVg06dct7o/3O5t1taJZuSLazbXazepk9YNoART0zgyaVpe/kVNf+n97Ky56a + IcM3rSpMHVhxUfwFDbm4ryIFAAA= headers: content-encoding: [gzip] - content-length: ['534'] + content-length: ['533'] content-type: [application/json] status: {code: 200, message: OK} - request: body: null headers: {} method: GET - uri: https://api.balancedpayments.com:443/customers/CU3Yrhw41eTJjqJBFTTVCXTr + uri: https://api.balancedpayments.com:443/customers/CU2eHRmBFee1y5mc84bVX2JW/bank_accounts?limit=10&offset=0 response: body: string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnetIsh0n8DEBeshZLfpAIdDkFmIikQ5JtTUM/XuXtiTTpFL2 - osPuzJA7O+LxJklS2mkjW1A63SbfsZAkx9MXW4K0gFXRNc2HsdZw8WqhIwhhWnaK+kCsM9CGC2K4 - FIPKINJPat2eEQOsIgYR6TIv1ov8fpEXZVFsV6vtcnW7KfKHzcO3dKJQBRHKXb65W947FCZ3VSuF - qf1hOLPHPn1afVX173UB5fPL2/Pjx7L8/PSlVJcz97UU/oBpreCnpWeTg1lcCY2mNRGm0oaYzhqZ - CrloiaH15bgWDPEshjcL3aSBg3a2AxDlj0YYU6C9TVFuDh4Q94QrheV8uQjL9uK+Fyiyl9hoKirZ - TJPKThh1cLvBILtO4z20ruZSp7WoGqLN2h8TWsKboMivAtfjWT9sfuykTngv0b+dIpxm6Nopzzo7 - Tosd+v2wIodIiWJVLRt2WqUTBYfMWZ85uHOSHY0dEa8VoSeTIjLX0ECJwY7HJAbMDNf9W9/xwfml - Z8yAPwaUwBT83zAhPLiUtS1iyRkSMBnX+85AhDyhAr5RRGhC7eMV0bhCBjr4SHQiNsMImmH/wpeZ - NJErKBhhgYJU7Py2/yOcAybg4lPLonkaQfh/9Tf9XxvCezBTBgAA + H4sIAAAAAAAAA61UXU/bMBR951dEedjTaG3X6ZeEpsJgsIki8bGxTVPkONdgkY/KcRBV1f8+201I + UujEJPoQqfde33vuOUd3ted5fsSyh5BxnpeZLvyp99sEPW/lviat8lLL7C7MyjQCZfL+gGA8ouMA + +x/rItcjYynY/NVs7p3Pro8vvKPL489n197N/Oxi3hRXs0K9XLh6fg/8wYxoKupOs0Ry8L70vG8K + oqLJJzJ7sFBrkAYmLwudpxuARzcETi/TwxMAvAxSPqbR91vy9cdzg62tw0dQUkjOtMwz0zYrk6Ta + bP28ImdZyBXEUpsKrUpoMgqYhjhkNuMThOk+Gu+j4TUeTjGeYtoLxpQQ9KtZQJh1QS2UzNybQKCI + TQQbCIwJAYEH0YRSRhGLBFAKIzBpwMPJgMKQEoQmeMAjyikijAOmTeNyEf8TS9Ajw2AwClpY7hUI + C6LfMUL/cEbusJizq+L2BO5+RifJzfmZPh01s1LQzIrQcFQr23jlyf0QQi2zsDhWUGzrJ/Wyor4m + 1qhkhAbyehi/DBfa7P4yvMhNIgl5Hr+SdLZXy3b2VeljiJzygiVFI72MLXM7qXKd1ub7x+7k14S5 + sJ+wwonfr61b9HcZtyvNp0SmUh9g9CEXogB9gCpN/AyebEvr3w2J/rO47zfETTdTMKpmbFCYSB1Y + KHiUeWkVbkHRuVHBvqueCanejwBDqbOhdUzrNHSPW8+JaGFtm33V8X5Pxut+VVuB7ebb/zrH4429 + 2/emPmtbUNv3rOWQLaB11bp2QBfn5l69EVRd/H8bOzI7+/S3MO4ka+1b1fbWfwGe3xfJhgYAAA== headers: content-encoding: [gzip] - content-length: ['495'] + content-length: ['625'] content-type: [application/json] status: {code: 200, message: OK} - request: - body: null - headers: {} - method: GET - uri: https://api.balancedpayments.com:443/customers/CU3Yrhw41eTJjqJBFTTVCXTr/bank_accounts?limit=10&offset=0 - response: - body: - string: !!binary | - H4sIAAAAAAAAA61U70/bMBD9zl8R5cM+jdZOXEoroakwhoCNShAQY5oix7mspmnSOQ6jqvK/z3YT - 8oNWYxL9EKl357t37z3des+y7IAmc58yluaJzOyx9UMFLWttviot0lzy5Jef5IsAhMrbroPxkBwO - sP2xKjI9EroAnb+ZXFnfJt7p1Dq5Pv187lm3V+fTq7q4nOXL1dLUsxmwuRpRV1SdJjFnYJ31rEsB - QVbnY57MNdQKpILJ8kymiw3Ak1v3u5j9IRi8i8ffF8dfPO/u5N4TLw06W/tPIHjEGZU8TVTbJI/j - crPiZUVGE58JCLlUFVLkUGcEUAmhT3XGdhAm+2i4j7CH8dh1xw7pOSM8HDkP9QKRWhfEUvDEvBlE - KKCjiLoRxo4DEXaDESGUIBpEQAgMQaUBH4xcAgfEQWiEXRYQRpBDGWBSN86X4T+wDIeHGA0aWGYC - Ig2i3zJC/3jiPjzeXR7fP8xpeDPLv04Hg7NndF3PWoCkWoSao0rZ2ivP5ocQapiFhqGArKsfl6uS - +opYpZISGpztYfw6nEm1++vwMlWJ2GdpuCVpbC9WzexW6UMIjPIRjbNaeh5q5nZSZToV6vtT72RX - hJmwHdPMiN+vrJv1dxm3Lc2nmC+4PMLoQxpFGcgjVGpiJ/CsW2r/bki0X8R9vyFmupqCUTljg0JF - qsBSwBNPc61wA4pMlQr6Xfks4uL9CFCUGhtqxzROQ/u49YyIGlbX7OuW93s8LPplbQm2nW/+ax2P - N/Zu3pvqrHWgNu9ZwyEdoFVVUTmgjXNzr94Iqir+v40Nma19+h2MO8kqbK3aXvEXbKzmtoYGAAA= - headers: - content-encoding: [gzip] - content-length: ['626'] - content-type: [application/json] - status: {code: 200, message: OK} -- request: - body: '{"amount": 1000.00, "description": "alice"}' + body: '{"amount": 1000.00, "meta": {"exchange_id": 1, "participant_id": 1}, "description": + "alice"}' headers: {} method: POST - uri: https://api.balancedpayments.com:443/bank_accounts/BA3ZjVKBXZkadShuLO55Gx0R/credits + uri: https://api.balancedpayments.com:443/bank_accounts/BA2g1fNaSsXFegYbFlUMItH7/credits response: body: {string: !!python/unicode "{\n \"credits\": [\n {\n \"status\": \"pending\",\n \"description\": \"alice\",\n \"links\": {\n \"customer\": - \"CU3Yrhw41eTJjqJBFTTVCXTr\",\n \"destination\": \"BA3ZjVKBXZkadShuLO55Gx0R\",\n - \ \"order\": null\n },\n \"updated_at\": \"2014-07-01T11:33:26.890394Z\",\n - \ \"created_at\": \"2014-07-01T11:33:26.464040Z\",\n \"transaction_number\": - \"CR317-809-4898\",\n \"failure_reason\": null,\n \"currency\": + \"CU2eHRmBFee1y5mc84bVX2JW\",\n \"destination\": \"BA2g1fNaSsXFegYbFlUMItH7\",\n + \ \"order\": null\n },\n \"updated_at\": \"2014-08-06T16:11:16.609323Z\",\n + \ \"created_at\": \"2014-08-06T16:11:16.336908Z\",\n \"transaction_number\": + \"CR558-399-7492\",\n \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": 1000,\n \"failure_reason_code\": null,\n - \ \"meta\": {},\n \"href\": \"/credits/CR41Koc50vYjzRVQM3AEPqUB\",\n - \ \"appears_on_statement_as\": \"example.com\",\n \"id\": \"CR41Koc50vYjzRVQM3AEPqUB\"\n + \ \"meta\": {\n \"exchange_id\": \"1\",\n \"participant_id\": + \"1\"\n },\n \"href\": \"/credits/CR2hZpvNGVj8Z79divl41tE4\",\n + \ \"appears_on_statement_as\": \"example.com\",\n \"id\": \"CR2hZpvNGVj8Z79divl41tE4\"\n \ }\n ],\n \"links\": {\n \"credits.order\": \"/orders/{credits.order}\",\n \ \"credits.customer\": \"/customers/{credits.customer}\",\n \"credits.destination\": \"/resources/{credits.destination}\",\n \"credits.reversals\": \"/credits/{credits.id}/reversals\",\n \ \"credits.events\": \"/credits/{credits.id}/events\"\n }\n}"} headers: - content-length: ['953'] + content-length: ['1018'] content-type: [application/json] status: {code: 201, message: CREATED} version: 1 diff --git a/tests/py/fixtures/TestCredits.yml b/tests/py/fixtures/TestCredits.yml new file mode 100644 index 0000000000..ec6bb8544e --- /dev/null +++ b/tests/py/fixtures/TestCredits.yml @@ -0,0 +1,67 @@ +interactions: +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3O2IKYocPZ5LA7GkZWpwKZ/bank_accounts?limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA61UXW+bMBR9769APOxpDTYfIUSqpnTqsi1R232pW6YJObZpvBBIjWkTRfz32Q4E + SIPWh74gcc/1veeec3V3Z4ZhzlGyDBHGaZ6IzBwav2XQMHb6K2Ge5oIl92GSr+aUS9yENgSuPRjY + 5tsqSddI0Ioq/O5qOv1mfBh9Hd8Yl6PriXE9qjPLRqHYrnUyXlC8lPXrjKrMx3RFufEZbWsoZslS + UazISXo4z4RKVLXe/3Bu7E+TXym+nXnTkT9ezu7WT5PZocDRtOEj5SxiGAmWJrJAksdxOVFxGA2j + JMScEiZkhuA5rRFOkaAkRAoxbQDdc+CfA/gdekPXGbpBD/j9gefV/c1ITkr5mrNEvyEI9z3okoAQ + B0FMfIQD2yOe7wYUOGCAbYlHyPaxB/qIRnOAg7kN+xBGURD0g1qZfE3+w8UDvgeaXBacRoqE1VoA + 63LkfJkm2dX4nmd/H6LFz4Xr3D64pO61ogIpE2qNKlPrHdlsNrbjoIbvhHCaHZvHxLbUvVJVWiRd + pvbpMHwezoQc/Hl4nUogDnFKToB61/m2iZ70ndC5tj1CcVb7zoiSrVMnXamQ3z9qJrNSS4fNGGXa + eava28zq2tq2L+9itmLiAoI3aRRlVFyAUlszoRtVUi3vXkTz4OzrNdHdZRcIyh57FjJSBdacPrI0 + Vw43qIhUuqDelc8ixl9PACmp3kG1MY270L5oPW2ionW86bvW4vcYKawytyTbxpt/rcvxwtrNY5NV + 5rVbNI9ZY0OOiFZZRUcRfaxeSGp/2TrodE6sxWzNYx1x7HxamMq1s+IftGquiHsGAAA= + headers: + content-encoding: [gzip] + content-length: ['620'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"amount": 1900.00, "meta": {"exchange_id": 2, "participant_id": 4}, "description": + "bob"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/bank_accounts/BA3QLnsEGgrsjqfhXh43Pq4d/credits + response: + body: {string: !!python/unicode "{\n \"credits\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"bob\",\n \"links\": {\n \"customer\": + \"CU3O2IKYocPZ5LA7GkZWpwKZ\",\n \"destination\": \"BA3QLnsEGgrsjqfhXh43Pq4d\",\n + \ \"order\": null\n },\n \"updated_at\": \"2014-08-06T16:10:29.977848Z\",\n + \ \"created_at\": \"2014-08-06T16:10:29.680080Z\",\n \"transaction_number\": + \"CR130-017-0655\",\n \"failure_reason\": null,\n \"currency\": + \"USD\",\n \"amount\": 1900,\n \"failure_reason_code\": null,\n + \ \"meta\": {\n \"exchange_id\": \"2\",\n \"participant_id\": + \"4\"\n },\n \"href\": \"/credits/CR1rvyY2Z7d46MsU9PScdBfT\",\n + \ \"appears_on_statement_as\": \"example.com\",\n \"id\": \"CR1rvyY2Z7d46MsU9PScdBfT\"\n + \ }\n ],\n \"links\": {\n \"credits.order\": \"/orders/{credits.order}\",\n + \ \"credits.customer\": \"/customers/{credits.customer}\",\n \"credits.destination\": + \"/resources/{credits.destination}\",\n \"credits.reversals\": \"/credits/{credits.id}/reversals\",\n + \ \"credits.events\": \"/credits/{credits.id}/events\"\n }\n}"} + headers: + content-length: ['1018'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0 + response: + body: {string: !!python/unicode "{\n \"bank_accounts\": [],\n \"meta\": {\n + \ \"last\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0\",\n + \ \"next\": null,\n \"href\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0\",\n + \ \"limit\": 10,\n \"offset\": 0,\n \"previous\": null,\n \"total\": + 0,\n \"first\": \"/customers/CU3KoKRb123DPYH3y6rw4OmF/bank_accounts?limit=10&offset=0\"\n + \ },\n \"links\": {}\n}"} + headers: + content-length: ['396'] + content-type: [application/json] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/py/fixtures/TestPayday.yml b/tests/py/fixtures/TestPayday.yml new file mode 100644 index 0000000000..36b6be7bd9 --- /dev/null +++ b/tests/py/fixtures/TestPayday.yml @@ -0,0 +1,438 @@ +interactions: +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd + response: + body: + string: !!binary | + H4sIAAAAAAAAA41Uy27bMBC85ysEnWvLipQ29i1oby2CAG3RokUh0CQLEZFIhY+ggqF/79KWZJpU + wlx02J0ZcmdHPFwlSYqN0qKlUqW75DcUkuRw/EKLo5ZClZumeTfVGsYfLXQCAUwJI7EPhDqhSjOO + NBN8VBlFhlnNdARpSiqkAZFeb/Jytfmw2uTf8ptdWezKcp0Xxfvb7a90pmBJX6UU622+uSlKh0LE + vmoF17U/DCP22I/fi88/Sf98//UT7b88FN3dD7mtn8j5zK4W3B8wrSX9a+nZ7GAWVwKjcY24rpRG + 2lgjUy5WLdK4Ph/XUo08i+mTheZp4KCdradI+qMhQiRV3qYw070HhD3BSun1cjkPy/bivhcg0glo + NBUWZKGJheFa9m43GGRvFNxDqWopdUrxqkFKl/6YtEWsCYrsInADnPXH5sdO6oT3HP31HOE0A9eO + eVbZYV7s2B/GFTlEjCSpatGQ4yqdKDhkRobMwZ2S7GjsEX+sED6aFJG5hAZKhO5ZTGLELHDdv/UF + H5xfesEM+k9TySEFbxsmhAeXsrZFLDlBAiZhqjOaRsgzKuBribhC2D5eEY0LZKADj4ThsRkm0AL7 + GV5m1ESuIOkECxSEJKe3/ZVwjpiAC08tieZpAsH/NVwN/wHQiK4AUwYAAA== + headers: + content-encoding: [gzip] + content-length: ['499'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA6VVW2+bMBR+76+weNhTmwBOyEWqprSbVq1NWq1dO3WakIPtxiqxmW2yoCr/fbaB + AL1o08YDEud+vvOdw9MBAF6CJFbeFHw3HwA8ubcRp4w/WnEtsJa50mJNpJF6p1/h+TdcbBbXH0hx + cQWz2Z2crH5ir/LfHdaBKOMPRGaScW0dx8mI+oMQwmiI6HicQAKjhPrhaBCRBEUDihMKI4yTkAQU + Tow5SSYUUor9IQqjkbcPnGw2sSQqT21cnqfpXsPz9bIsc9t6AvM03mij4kwojdJ4jXSysrVx0ejJ + NmMSaSZ4vBZcW33g7zOsiUZdcCR5MLYOGsFpruxHbW6xY7qItfjlLNoKhLFpQsWhVZyILQhfQsiw + i3sK52cn6i7anKELqPKLW3xzu7yctBBBmjwIWVhroVcGgn3BusiIFSeSYKa7INb9dzBcIv4Yc7R2 + Xp+v5pdfPs0W4PRsdv0RnMwW54dg0Zv1ungqLQnRDZ4FUY3BUiLu+rhlCjXiPMOmahwjx47QDwZH + /ujID26C4XQAp4NhbzwMQhjct1KVkBn7NjkNwEbS7qFkMbHIviIObD4TGcwR4+Dald4ejKGGds2/ + Os+KOonAzmbih4Hf9k5EzrUs4srA5n+xGQniMSZLM44p0DInDX9L2DvzaPGxIMjuYOiHDSHNMjxr + 02Mq3hDJKCMW9k4CS/796nhl76BiIjBjAmV7wFYPsABcaOBY0hq4rb5i0xRQlKqm/pUk1KLSd7el + /xfEleQPJBhEcBLA+3I3dgbKHxYtr7OHXoqUY1G/vlQm9xt3qiztfcrWTB8H/jtBqSL6uJ6hx8m2 + e1a8pqnqDP57cJfVFFofFK/MbiTVQL1Mkg0TuT3ADQs8Lcy5sn4lUzzK5P83bGB0x/rZxS//Cz3M + VJZrs8fNOJ/cVHsM7/p7bVVQqWn/J1qjqPxq7a5alyqRdY1XInX/opo5rVQtfSeZW6A3fCqd7fBg + 9xv4QHhu7QYAAA== + headers: + content-encoding: [gzip] + content-length: ['751'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"amount": 1000, "meta": {"state": "new", "participant_id": 2}, "description": + "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/cards/CC3MHBsW6vHaL3suLVdTVbO9/card_holds + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": null\n },\n \"updated_at\": + \"2014-07-28T12:45:10.156500Z\",\n \"created_at\": \"2014-07-28T12:45:09.914076Z\",\n + \ \"transaction_number\": \"HL141-112-2168\",\n \"expires_at\": \"2014-08-04T12:45:10.042686Z\",\n + \ \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": + 1000,\n \"meta\": {\n \"state\": \"new\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/card_holds/HL4Q9bCd6Wt60Z4H8QCgJI9\",\n + \ \"failure_reason_code\": null,\n \"voided_at\": null,\n \"id\": + \"HL4Q9bCd6Wt60Z4H8QCgJI9\"\n }\n ],\n \"links\": {\n \"card_holds.events\": + \"/card_holds/{card_holds.id}/events\",\n \"card_holds.card\": \"/cards/{card_holds.card}\",\n + \ \"card_holds.debits\": \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": + \"/debits/{card_holds.debit}\"\n }\n}"} + headers: + content-length: ['942'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"amount": 1000, "description": "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/card_holds/HL4Q9bCd6Wt60Z4H8QCgJI9/debits + response: + body: {string: !!python/unicode "{\n \"debits\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"customer\": + \"CU3KXdyvNSDeyLP3pAWr9hqd\",\n \"source\": \"CC3MHBsW6vHaL3suLVdTVbO9\",\n + \ \"order\": null,\n \"dispute\": null\n },\n \"updated_at\": + \"2014-07-28T12:45:11.072385Z\",\n \"created_at\": \"2014-07-28T12:45:10.634916Z\",\n + \ \"transaction_number\": \"W048-092-6532\",\n \"failure_reason\": + null,\n \"currency\": \"USD\",\n \"amount\": 1000,\n \"failure_reason_code\": + null,\n \"meta\": {\n \"state\": \"new\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/debits/WD5EixoE4g0Y05maT0KUnBj\",\n \"appears_on_statement_as\": + \"BAL*example.com\",\n \"id\": \"WD5EixoE4g0Y05maT0KUnBj\"\n }\n ],\n + \ \"links\": {\n \"debits.customer\": \"/customers/{debits.customer}\",\n + \ \"debits.dispute\": \"/disputes/{debits.dispute}\",\n \"debits.source\": + \"/resources/{debits.source}\",\n \"debits.order\": \"/orders/{debits.order}\",\n + \ \"debits.refunds\": \"/debits/{debits.id}/refunds\",\n \"debits.events\": + \"/debits/{debits.id}/events\"\n }\n}"} + headers: + content-length: ['1061'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"status": "succeeded", "description": "janet", "amount": 1000, "created_at": + "2014-07-28T12:45:09.914076Z", "card_href": "/cards/CC3MHBsW6vHaL3suLVdTVbO9", + "updated_at": "2014-07-28T12:45:10.156500Z", "expires_at": "2014-08-04T12:45:10.042686Z", + "failure_reason": null, "currency": "USD", "transaction_number": "HL141-112-2168", + "meta": {"state": "captured", "participant_id": "2"}, "debit": null, "failure_reason_code": + null, "voided_at": null, "id": "HL4Q9bCd6Wt60Z4H8QCgJI9"}' + headers: {} + method: PUT + uri: https://api.balancedpayments.com:443/card_holds/HL4Q9bCd6Wt60Z4H8QCgJI9 + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": \"WD5EixoE4g0Y05maT0KUnBj\"\n + \ },\n \"updated_at\": \"2014-07-28T12:45:11.454240Z\",\n \"created_at\": + \"2014-07-28T12:45:09.914076Z\",\n \"transaction_number\": \"HL141-112-2168\",\n + \ \"expires_at\": \"2014-08-04T12:45:10.042686Z\",\n \"failure_reason\": + null,\n \"currency\": \"USD\",\n \"amount\": 1000,\n \"meta\": + {\n \"state\": \"captured\",\n \"participant_id\": \"2\"\n },\n + \ \"href\": \"/card_holds/HL4Q9bCd6Wt60Z4H8QCgJI9\",\n \"failure_reason_code\": + null,\n \"voided_at\": null,\n \"id\": \"HL4Q9bCd6Wt60Z4H8QCgJI9\"\n + \ }\n ],\n \"links\": {\n \"card_holds.events\": \"/card_holds/{card_holds.id}/events\",\n + \ \"card_holds.card\": \"/cards/{card_holds.card}\",\n \"card_holds.debits\": + \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": \"/debits/{card_holds.debit}\"\n + \ }\n}"} + headers: + content-length: ['968'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd + response: + body: + string: !!binary | + H4sIAAAAAAAAA41Uy27bMBC85ysEnWvLipQ29i1oby2CAG3RokUh0CQLEZFIhY+ggqF/79KWZJpU + wlx02J0ZcmdHPFwlSYqN0qKlUqW75DcUkuRw/EKLo5ZClZumeTfVGsYfLXQCAUwJI7EPhDqhSjOO + NBN8VBlFhlnNdARpSiqkAZFeb/Jytfmw2uTf8ptdWezKcp0Xxfvb7a90pmBJX6UU622+uSlKh0LE + vmoF17U/DCP22I/fi88/Sf98//UT7b88FN3dD7mtn8j5zK4W3B8wrSX9a+nZ7GAWVwKjcY24rpRG + 2lgjUy5WLdK4Ph/XUo08i+mTheZp4KCdradI+qMhQiRV3qYw070HhD3BSun1cjkPy/bivhcg0glo + NBUWZKGJheFa9m43GGRvFNxDqWopdUrxqkFKl/6YtEWsCYrsInADnPXH5sdO6oT3HP31HOE0A9eO + eVbZYV7s2B/GFTlEjCSpatGQ4yqdKDhkRobMwZ2S7GjsEX+sED6aFJG5hAZKhO5ZTGLELHDdv/UF + H5xfesEM+k9TySEFbxsmhAeXsrZFLDlBAiZhqjOaRsgzKuBribhC2D5eEY0LZKADj4ThsRkm0AL7 + GV5m1ESuIOkECxSEJKe3/ZVwjpiAC08tieZpAsH/NVwN/wHQiK4AUwYAAA== + headers: + content-encoding: [gzip] + content-length: ['499'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA6VVW2+bMBR+76+weNhTmwBOyEWqprSbVq1NWq1dO3WakIPtxiqxmW2yoCr/fbaB + AL1o08YDEud+vvOdw9MBAF6CJFbeFHw3HwA8ubcRp4w/WnEtsJa50mJNpJF6p1/h+TdcbBbXH0hx + cQWz2Z2crH5ir/LfHdaBKOMPRGaScW0dx8mI+oMQwmiI6HicQAKjhPrhaBCRBEUDihMKI4yTkAQU + Tow5SSYUUor9IQqjkbcPnGw2sSQqT21cnqfpXsPz9bIsc9t6AvM03mij4kwojdJ4jXSysrVx0ejJ + NmMSaSZ4vBZcW33g7zOsiUZdcCR5MLYOGsFpruxHbW6xY7qItfjlLNoKhLFpQsWhVZyILQhfQsiw + i3sK52cn6i7anKELqPKLW3xzu7yctBBBmjwIWVhroVcGgn3BusiIFSeSYKa7INb9dzBcIv4Yc7R2 + Xp+v5pdfPs0W4PRsdv0RnMwW54dg0Zv1ungqLQnRDZ4FUY3BUiLu+rhlCjXiPMOmahwjx47QDwZH + /ujID26C4XQAp4NhbzwMQhjct1KVkBn7NjkNwEbS7qFkMbHIviIObD4TGcwR4+Dald4ejKGGds2/ + Os+KOonAzmbih4Hf9k5EzrUs4srA5n+xGQniMSZLM44p0DInDX9L2DvzaPGxIMjuYOiHDSHNMjxr + 02Mq3hDJKCMW9k4CS/796nhl76BiIjBjAmV7wFYPsABcaOBY0hq4rb5i0xRQlKqm/pUk1KLSd7el + /xfEleQPJBhEcBLA+3I3dgbKHxYtr7OHXoqUY1G/vlQm9xt3qiztfcrWTB8H/jtBqSL6uJ6hx8m2 + e1a8pqnqDP57cJfVFFofFK/MbiTVQL1Mkg0TuT3ADQs8Lcy5sn4lUzzK5P83bGB0x/rZxS//Cz3M + VJZrs8fNOJ/cVHsM7/p7bVVQqWn/J1qjqPxq7a5alyqRdY1XInX/opo5rVQtfSeZW6A3fCqd7fBg + 9xv4QHhu7QYAAA== + headers: + content-encoding: [gzip] + content-length: ['751'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"amount": 1576, "meta": {"state": "new", "participant_id": 2}, "description": + "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/cards/CC3MHBsW6vHaL3suLVdTVbO9/card_holds + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": null\n },\n \"updated_at\": + \"2014-07-28T12:45:12.850022Z\",\n \"created_at\": \"2014-07-28T12:45:12.631439Z\",\n + \ \"transaction_number\": \"HL977-592-8484\",\n \"expires_at\": \"2014-08-04T12:45:12.764652Z\",\n + \ \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": + 1576,\n \"meta\": {\n \"state\": \"new\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/card_holds/HL7TDxM5fKRKe3RqQYc6eNv\",\n + \ \"failure_reason_code\": null,\n \"voided_at\": null,\n \"id\": + \"HL7TDxM5fKRKe3RqQYc6eNv\"\n }\n ],\n \"links\": {\n \"card_holds.events\": + \"/card_holds/{card_holds.id}/events\",\n \"card_holds.card\": \"/cards/{card_holds.card}\",\n + \ \"card_holds.debits\": \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": + \"/debits/{card_holds.debit}\"\n }\n}"} + headers: + content-length: ['942'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"amount": 1576, "description": "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/card_holds/HL7TDxM5fKRKe3RqQYc6eNv/debits + response: + body: {string: !!python/unicode "{\n \"debits\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"customer\": + \"CU3KXdyvNSDeyLP3pAWr9hqd\",\n \"source\": \"CC3MHBsW6vHaL3suLVdTVbO9\",\n + \ \"order\": null,\n \"dispute\": null\n },\n \"updated_at\": + \"2014-07-28T12:45:13.689850Z\",\n \"created_at\": \"2014-07-28T12:45:13.269306Z\",\n + \ \"transaction_number\": \"W428-667-1972\",\n \"failure_reason\": + null,\n \"currency\": \"USD\",\n \"amount\": 1576,\n \"failure_reason_code\": + null,\n \"meta\": {\n \"state\": \"new\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/debits/WD8C07Yk8Sw3QuUqCbilLgh\",\n \"appears_on_statement_as\": + \"BAL*example.com\",\n \"id\": \"WD8C07Yk8Sw3QuUqCbilLgh\"\n }\n ],\n + \ \"links\": {\n \"debits.customer\": \"/customers/{debits.customer}\",\n + \ \"debits.dispute\": \"/disputes/{debits.dispute}\",\n \"debits.source\": + \"/resources/{debits.source}\",\n \"debits.order\": \"/orders/{debits.order}\",\n + \ \"debits.refunds\": \"/debits/{debits.id}/refunds\",\n \"debits.events\": + \"/debits/{debits.id}/events\"\n }\n}"} + headers: + content-length: ['1061'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"status": "succeeded", "description": "janet", "amount": 1576, "created_at": + "2014-07-28T12:45:12.631439Z", "card_href": "/cards/CC3MHBsW6vHaL3suLVdTVbO9", + "updated_at": "2014-07-28T12:45:12.850022Z", "expires_at": "2014-08-04T12:45:12.764652Z", + "failure_reason": null, "currency": "USD", "transaction_number": "HL977-592-8484", + "meta": {"state": "captured", "participant_id": "2"}, "debit": null, "failure_reason_code": + null, "voided_at": null, "id": "HL7TDxM5fKRKe3RqQYc6eNv"}' + headers: {} + method: PUT + uri: https://api.balancedpayments.com:443/card_holds/HL7TDxM5fKRKe3RqQYc6eNv + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": \"WD8C07Yk8Sw3QuUqCbilLgh\"\n + \ },\n \"updated_at\": \"2014-07-28T12:45:14.126939Z\",\n \"created_at\": + \"2014-07-28T12:45:12.631439Z\",\n \"transaction_number\": \"HL977-592-8484\",\n + \ \"expires_at\": \"2014-08-04T12:45:12.764652Z\",\n \"failure_reason\": + null,\n \"currency\": \"USD\",\n \"amount\": 1576,\n \"meta\": + {\n \"state\": \"captured\",\n \"participant_id\": \"2\"\n },\n + \ \"href\": \"/card_holds/HL7TDxM5fKRKe3RqQYc6eNv\",\n \"failure_reason_code\": + null,\n \"voided_at\": null,\n \"id\": \"HL7TDxM5fKRKe3RqQYc6eNv\"\n + \ }\n ],\n \"links\": {\n \"card_holds.events\": \"/card_holds/{card_holds.id}/events\",\n + \ \"card_holds.card\": \"/cards/{card_holds.card}\",\n \"card_holds.debits\": + \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": \"/debits/{card_holds.debit}\"\n + \ }\n}"} + headers: + content-length: ['968'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3O2IKYocPZ5LA7GkZWpwKZ + response: + body: + string: !!binary | + H4sIAAAAAAAAA41UTY/TMBS876+IcqabpJu2orcVB4QWCQ4gRBGKXNsoVhM7+AOoqvx3ntMk69oB + 7yWH55mJ37zxu9wlSYqN0qKlUqX75BsUkuQyfOGIo5ZClZumeTXVGsZPFjqBAKaEkdgHQp1QpRlH + mgk+qowi/axmOoI0JRXSgEjXeVGu8t0qLz4Vm335sC+397tNmW/zQzpTsKQRynazLnavHQoRx6oV + XNd+M4zY3775/PBh/e7pq8AfD5v3j7u3p8OX7veTI9DVgvsNprWkPyw9mx3M4kpgNK4R15XSSBtr + ZMrFqkUa188ttlQjz2L6czAoDRy0vZ0pkn5riBBJlTcpzPTZA8KcYKR0vVwuwrK9uO8FiHQCDpoK + C7JwiIXhWp7d06CRo1FwD6WqpdQpxasGKV36bdIWsSYospvA9fCv7zY/tlMnvM/Rv58jnGbg2pBn + lV3mwY7n/Tgih4iRJFUtGjKM0omCQ2akzxzcNcmOxhHxU4XwYFJE5hYaKBF6ZDGJEbPAdV/rP3xw + nvSCGfSPppJDCl7WTAgPLmVti1hyhQRMwlRnNI2QZ1TA1xJxhbBdXhGNG2SgA0vC8FgPE2iB/Qs2 + M2oiV5B0ggUKQpLrbv9POEdMwIVVS6J5mkDwvvq7/i9xeE/EUwYAAA== + headers: + content-encoding: [gzip] + content-length: ['496'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3O2IKYocPZ5LA7GkZWpwKZ/bank_accounts?limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA61UXW+bMBR9769APOxpDTYfIUSqpnTqsi1R232pW6YJObZpvBBIjWkTRfz32Q4E + SIPWh74gcc/1veeec3V3Z4ZhzlGyDBHGaZ6IzBwav2XQMHb6K2Ge5oIl92GSr+aUS9yENgSuPRjY + 5tsqSddI0Ioq/O5qOv1mfBh9Hd8Yl6PriXE9qjPLRqHYrnUyXlC8lPXrjKrMx3RFufEZbWsoZslS + UazISXo4z4RKVLXe/3Bu7E+TXym+nXnTkT9ezu7WT5PZocDRtOEj5SxiGAmWJrJAksdxOVFxGA2j + JMScEiZkhuA5rRFOkaAkRAoxbQDdc+CfA/gdekPXGbpBD/j9gefV/c1ITkr5mrNEvyEI9z3okoAQ + B0FMfIQD2yOe7wYUOGCAbYlHyPaxB/qIRnOAg7kN+xBGURD0g1qZfE3+w8UDvgeaXBacRoqE1VoA + 63LkfJkm2dX4nmd/H6LFz4Xr3D64pO61ogIpE2qNKlPrHdlsNrbjoIbvhHCaHZvHxLbUvVJVWiRd + pvbpMHwezoQc/Hl4nUogDnFKToB61/m2iZ70ndC5tj1CcVb7zoiSrVMnXamQ3z9qJrNSS4fNGGXa + eava28zq2tq2L+9itmLiAoI3aRRlVFyAUlszoRtVUi3vXkTz4OzrNdHdZRcIyh57FjJSBdacPrI0 + Vw43qIhUuqDelc8ixl9PACmp3kG1MY270L5oPW2ionW86bvW4vcYKawytyTbxpt/rcvxwtrNY5NV + 5rVbNI9ZY0OOiFZZRUcRfaxeSGp/2TrodE6sxWzNYx1x7HxamMq1s+IftGquiHsGAAA= + headers: + content-encoding: [gzip] + content-length: ['620'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"amount": 1500.00, "description": "homer"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/bank_accounts/BA3QLnsEGgrsjqfhXh43Pq4d/credits + response: + body: {string: !!python/unicode "{\n \"credits\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"homer\",\n \"links\": {\n \"customer\": + \"CU3O2IKYocPZ5LA7GkZWpwKZ\",\n \"destination\": \"BA3QLnsEGgrsjqfhXh43Pq4d\",\n + \ \"order\": null\n },\n \"updated_at\": \"2014-07-28T12:45:15.420772Z\",\n + \ \"created_at\": \"2014-07-28T12:45:15.147750Z\",\n \"transaction_number\": + \"CR799-163-2280\",\n \"failure_reason\": null,\n \"currency\": + \"USD\",\n \"amount\": 1500,\n \"failure_reason_code\": null,\n + \ \"meta\": {},\n \"href\": \"/credits/CRaID8fpEYnsVwGSlUuCAZW\",\n + \ \"appears_on_statement_as\": \"example.com\",\n \"id\": \"CRaID8fpEYnsVwGSlUuCAZW\"\n + \ }\n ],\n \"links\": {\n \"credits.order\": \"/orders/{credits.order}\",\n + \ \"credits.customer\": \"/customers/{credits.customer}\",\n \"credits.destination\": + \"/resources/{credits.destination}\",\n \"credits.reversals\": \"/credits/{credits.id}/reversals\",\n + \ \"credits.events\": \"/credits/{credits.id}/events\"\n }\n}"} + headers: + content-length: ['953'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd + response: + body: + string: !!binary | + H4sIAAAAAAAAA41Uy27bMBC85ysEnWvLipQ29i1oby2CAG3RokUh0CQLEZFIhY+ggqF/79KWZJpU + wlx02J0ZcmdHPFwlSYqN0qKlUqW75DcUkuRw/EKLo5ZClZumeTfVGsYfLXQCAUwJI7EPhDqhSjOO + NBN8VBlFhlnNdARpSiqkAZFeb/Jytfmw2uTf8ptdWezKcp0Xxfvb7a90pmBJX6UU622+uSlKh0LE + vmoF17U/DCP22I/fi88/Sf98//UT7b88FN3dD7mtn8j5zK4W3B8wrSX9a+nZ7GAWVwKjcY24rpRG + 2lgjUy5WLdK4Ph/XUo08i+mTheZp4KCdradI+qMhQiRV3qYw070HhD3BSun1cjkPy/bivhcg0glo + NBUWZKGJheFa9m43GGRvFNxDqWopdUrxqkFKl/6YtEWsCYrsInADnPXH5sdO6oT3HP31HOE0A9eO + eVbZYV7s2B/GFTlEjCSpatGQ4yqdKDhkRobMwZ2S7GjsEX+sED6aFJG5hAZKhO5ZTGLELHDdv/UF + H5xfesEM+k9TySEFbxsmhAeXsrZFLDlBAiZhqjOaRsgzKuBribhC2D5eEY0LZKADj4ThsRkm0AL7 + GV5m1ESuIOkECxSEJKe3/ZVwjpiAC08tieZpAsH/NVwN/wHQiK4AUwYAAA== + headers: + content-encoding: [gzip] + content-length: ['499'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3O2IKYocPZ5LA7GkZWpwKZ + response: + body: + string: !!binary | + H4sIAAAAAAAAA41UTY/TMBS876+IcqabpJu2orcVB4QWCQ4gRBGKXNsoVhM7+AOoqvx3ntMk69oB + 7yWH55mJ37zxu9wlSYqN0qKlUqX75BsUkuQyfOGIo5ZClZumeTXVGsZPFjqBAKaEkdgHQp1QpRlH + mgk+qowi/axmOoI0JRXSgEjXeVGu8t0qLz4Vm335sC+397tNmW/zQzpTsKQRynazLnavHQoRx6oV + XNd+M4zY3775/PBh/e7pq8AfD5v3j7u3p8OX7veTI9DVgvsNprWkPyw9mx3M4kpgNK4R15XSSBtr + ZMrFqkUa188ttlQjz2L6czAoDRy0vZ0pkn5riBBJlTcpzPTZA8KcYKR0vVwuwrK9uO8FiHQCDpoK + C7JwiIXhWp7d06CRo1FwD6WqpdQpxasGKV36bdIWsSYospvA9fCv7zY/tlMnvM/Rv58jnGbg2pBn + lV3mwY7n/Tgih4iRJFUtGjKM0omCQ2akzxzcNcmOxhHxU4XwYFJE5hYaKBF6ZDGJEbPAdV/rP3xw + nvSCGfSPppJDCl7WTAgPLmVti1hyhQRMwlRnNI2QZ1TA1xJxhbBdXhGNG2SgA0vC8FgPE2iB/Qs2 + M2oiV5B0ggUKQpLrbv9POEdMwIVVS6J5mkDwvvq7/i9xeE/EUwYAAA== + headers: + content-encoding: [gzip] + content-length: ['496'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3O2IKYocPZ5LA7GkZWpwKZ/credits?sort=created_at%2Cdesc&limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA+WZW2/iOBSA3+dXVJF2njbBd8eRqlVLKXTohYG2FFYrlCZOyRYSSEKZtup/XycQ + yHSbHbTMSEi8RBD7XOx88vE55/XTwYHmRNL1k1izDv5Ufw8OXrOnGogTO5ml77V45jhSutLVfs8H + XRk7kT9J/DBIZwzDsYzWoyM/eEwlc12pmVmcZJPU7OoNvkJnzV7otPr0/IjXH/vdybzZXylQ85WB + xA/s3MDxEf56HsS1+kMU/z31hndDgltTsvZIiYSRm+kPZqPR0s+3lcOziWsn0h3YSeoBApDogOvI + vIbIItSC1CAIcI7WTqQ78wMRSDinoCCSRHYQ207q9SCYje+X621zIXTIsI6QCdbb5Nn+aBbJgbI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ws+ + kneStEr2K66sZLL/b0uAV1bUTqhZ9ug/DK2nvLP1rtFViWQcziJHFowWpvzLdLGvViB75XA+/pZt + 1ae3fwBwhxeM9BsAAA== + headers: + content-encoding: [gzip] + content-length: ['1153'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/debits?sort=created_at%2Cdesc&limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA+2Z62/iRhDAv99fESH1PlS1sy/vrpGiKhBS2lByF15Nqgo59kKcgO34waNR/veu + H2AgcMf1HClt+BLZu56ZnZnfTmaXpw9HR6WxCI1S+ehJPsu3kRGE8q10bEZB6I6FHxxXO/jiD2s+ + abbOxLzxCXunPV+/e7SOLXFrh8HPgeuHJ6YvjFBYfSP8AVUtEZgfR/bYDk8g+OgOBoEITxAEpZ9S + I46YvZKR3MadLwav48jSjcRDaQOCzK/UUzmyGPB8MbHdKJBDTjQaZZ+FbmiM5BCCMBsZ2P5rhR2U + ZMyfYzulke08xEvJUp2mT10keiNYTxvTz4vkZeOWHXhRKBKp7Dk4XghlA5sygRv5Zirii/Qll0nf + N0Vc3xJ+YiR5yj9PXje/ljmPHCv2US4qoXO5JNt6Pl5MZ1HPPBET4YQ7ZbLZZRBTIWnhz4TlNJYy + uEFohEmiS0FkmkJYwsoiJifjDeHbXmi7TvzFveGIMJ9dz0uyDVeTsmv/LRXE1peRrVbx7/VK0KOT + utHAQdToWu3u7aW++vUiqDmTidE8pfFE4l6GTjIdeVa2xWMfEIBEAUxBvA1RmWhliFXKda6Bm9yz + vCrsEkFUx4CuiIS+4QSGGYeq70Tj2zT7PYK4QilToM5Qrn9g2KPIF31ZfIIktKseySD6vnDMeWy7 + 0zrLxYyxGznJztUYTWGQ/q0r65uuFaO6pnGtViZBidOeEO2I6WqIPcMPbdP2DCfs21bifbwR1yO6 + rFEZq70zXgXs+oG3pvhz1Hms3tqjxvBuZeGeJww/6MvYJIbHkty+kVBXOW38KGbG2BsJ1XTHuUxq + fZfqZE1JeTiwvMIyVAFDmGvfwDJQKSY63INlQLgCdKRQDRfJMgDZv503wrJWs2dujQzBNdDGRhtc + dJzKfTEsb1d9YPllXSZlwFXOOaRoX5YTEcIY0vDX6zImVOGcKAwC/j+uy/Si2e5+Nm8nQ2M0qAl8 + ecaqV5NiYN6h+0DzVpqpCrGO1lqGL3YZkmZNpYwyvE9lhlihHCkE8wIrMwJ61ui/kcpM67XK5XW3 + hj0Ia7ptuV4wDVbaVeM72owdug80b6UZq5gRQPRvqM1I1QmCFH69NhMOFVn4FZ1RrcDa/Nb6DFo7 + tVsP9YY/fTD4Q7My/JuAeVE0b9d9oPkFzZiWCVKZBiFbLbRfqs2pCCQA0X06DUAVSJgCuAaLpJkW + VZtNwwvlYTQnT1Z7MTPvDGcosjNgvnA59y+PiNS/CuH5RHeazWG33rRvQ7ty1SqoFdmu+4D7S9xJ + mcguGXAE2Z7FGyciAEAIVkV2XXhATZFNu4J1/q5xJ05knfe08QOpeae1zo0N5+ddUQzuO3QfcH+B + O8Tx/R6BgMB970RSEQAIYKsiO3DHmjxHyjsRjkmR50jwX6vuZGi0Z4BefBrXamI2hPNmfbByeVv6 + ntZ8h+4D7i9xR2WoqTrkZO/WXF6CSxFNwq7v05pD2ZprTMFcZ++5mcHWZOL82q53p5zbo1mr/UvP + vcHFVPcdug+4b+AOy3EjDlT5A61G9vv1JhHBuso4Q2QP3OUhV9ExVJD8yfNd4/74W5UxisLG/elU + Z1fTs87N8Log3LfrTnGXf//68PwP4sdp3vAfAAA= + headers: + content-encoding: [gzip] + content-length: ['1226'] + content-type: [application/json] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/py/fixtures/TestPaydayCharge.yml b/tests/py/fixtures/TestPaydayCharge.yml deleted file mode 100644 index 2bae9a87d8..0000000000 --- a/tests/py/fixtures/TestPaydayCharge.yml +++ /dev/null @@ -1,280 +0,0 @@ -interactions: -- request: - body: null - headers: {} - method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr - response: - body: - string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIkp028NXtJbcU6aEtCmFNshURiXT4CGIY+vcubUmmSaXs - RYfdmSF3dsTjTZblxGojO6Z0vsl+YiHLjqcvtgR0DKvCtu2HsdZy8eygIwhhWlpFQiDWKdOGCzBc - ikFlEOknNbunYBitwSAir5blerH8tFiWT2W5WVWbqrpd35X398sf+UQhiiUoq2p993HlUajc1Z0U - pgmH4dQdu/1Wfd3yPw/bl8fP9PvjF/LUvK4e3tTlzH0jRThg3ij229GLycEirYRGkwaEqbUBY52R - uZCLDgxpLsd1zEBgMXtx0DKPHHSzHRiocDSgVDEdbIpwcwiAuCdcKavmy2VcdhcPvUCRvcRGWxNJ - Z5pEWmHUwe9Gg+ysxntoXc+lTmtRt6DNOhyTdcDbqMivAtfjWb9cftykXngv0b+dIpwX6Nopz7o4 - Tosd+v2wIo9IQNG6kS09rdKLgkfmtC883DnJnsYOxHMN5GRSQuYaGilRtuMpiQEzw/X/1nd88H7p - GTPYm2FKYAr+b5gYHl3K2Zaw5AyJmJTrvTUsQZ5QEd8oEBqIe7wSGlfISAcfCStSM4ygGfYrvszQ - Jq6g2AiLFKSi57f9H+EcMBEXn1qazNMIwv+rv+n/AoxtLhJTBgAA - headers: - content-encoding: [gzip] - content-length: ['495'] - content-type: [application/json] - status: {code: 200, message: OK} -- request: - body: null - headers: {} - method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/cards?limit=10&offset=0 - response: - body: - string: !!binary | - H4sIAAAAAAAAA6VVyW7bMBC95ysIHXpKbIlyvAFB4ThBigRx9gJNUQg0F5uITDok5dgI/O8lKcmS - sqBFy4MAzcKZefNm+LoHQICRIjoYgp/2B4BX/7XilIsnJy4FzjLTRi6ostJg/ABvx3x2Pn6+OSE/ - bk7x/XwVn69VUPhv98uLGBczqpaKC+Mc+7jHwg6M4+4hYv0+jmncxSyEvU6XYtTtMIJZ3CUEQxqx - eGDNKR6wmDESHiLY7QW7i/FqlSiqs9TdK7I03WlEtpjmaa5rJ7Kn8kYrnSylNihNFsjguctNyEpP - 10uukOFSJAspjNNH4S7CghrUBEfRmbX10EjBMu1+SnOHHTebxMgXb1FXIEJsETqBTnEs1wC+h5AT - f+8Y3p1dn0yujx9CeXUxRVQPzPO4VhNGhs6k2jhraeYWgl3CZrOkTowVJdw0QSzrb2A4ReIpEWjh - vc6vL69uz0YTMP42ujsFx6PJxT6YtEatJp7aKEpNheeG6spgqpDwdXznGlXibEls1iRBnh0wjDoH - Ye8gjO6jaBjDIYxb/X4fdgaPtVA5ZNa+Tk4LsJXUa8hZTB2yH4gjFy+CMbhEXIA7n3q9MZYaxhf/ - YT8L6mBJvM0ghFFY98YyE0ZtksLAxX83GRiJhNCpbccQGJXRir857I1+1Pi4ocjNIAxhRUg7DG/K - DLhOVlRxxqmDvRHAkX83OkFeOyiYCGybQF4ecNkDIoGQBniW1Brusi/YNAQMpbrKf64oc6i0/W5p - /wVxFf0DCWC/04l7j/lsbC2UvxxaQWMOgxRpz6J2uals7E/2VJ7a15QvuDmKwi+SMU3NUdnDQNB1 - c60EVVHFGvz3y31Um2i5UII8upUUDQ2Wiq64zNwCrlgQGGnXlfPLmRIwrv6/YAujX9ZvNn7+LrQI - 18vM2Dmu2vnqu9riZNveaYuEck39nai1ovArtdtiXIpAzjWZy9S/RSVzaqFq+kYwP0Cf+BQ6V+He - 9jfXVB+z7QYAAA== - headers: - content-encoding: [gzip] - content-length: ['751'] - content-type: [application/json] - status: {code: 200, message: OK} -- request: - body: '{"amount": 1576, "description": "janet"}' - headers: {} - method: POST - uri: https://api.balancedpayments.com:443/cards/CC2SGPDNPBU0oOKbaes9tqC1/debits - response: - body: {string: !!python/unicode "{\n \"debits\": [\n {\n \"status\": - \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"customer\": - \"CU2RCigJCqQDdYQEcThv3Jxr\",\n \"source\": \"CC2SGPDNPBU0oOKbaes9tqC1\",\n - \ \"order\": null,\n \"dispute\": null\n },\n \"updated_at\": - \"2014-07-01T11:32:58.045082Z\",\n \"created_at\": \"2014-07-01T11:32:57.356510Z\",\n - \ \"transaction_number\": \"W081-983-3951\",\n \"failure_reason\": - null,\n \"currency\": \"USD\",\n \"amount\": 1576,\n \"failure_reason_code\": - null,\n \"meta\": {},\n \"href\": \"/debits/WD3v0UIBWb9TGirT5zELhtlj\",\n - \ \"appears_on_statement_as\": \"BAL*example.com\",\n \"id\": \"WD3v0UIBWb9TGirT5zELhtlj\"\n - \ }\n ],\n \"links\": {\n \"debits.customer\": \"/customers/{debits.customer}\",\n - \ \"debits.dispute\": \"/disputes/{debits.dispute}\",\n \"debits.source\": - \"/resources/{debits.source}\",\n \"debits.order\": \"/orders/{debits.order}\",\n - \ \"debits.refunds\": \"/debits/{debits.id}/refunds\",\n \"debits.events\": - \"/debits/{debits.id}/events\"\n }\n}"} - headers: - content-length: ['1002'] - content-type: [application/json] - status: {code: 201, message: CREATED} -- request: - body: null - headers: {} - method: GET - uri: https://api.balancedpayments.com:443/customers/CU2Uomy8gvhh6SdpAqQO2wHv - response: - body: - string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIUoxY9S3opbeiaHJpUQg0yUREJFLhw6lh6N+7lCWZJtWw - Fx12Z4bc2RFPN0mSYqO0aKlU6S75BYUkOQ1faHHUUqhy0zSfplrD+KuFTiCAKWEk9oFQJ1RpxpFm - go8qo0g/q5mOIE1JhTQg0mKdb1br7WqdP+b57q7YFZvbsvy83RY/05mCJY1QtuXd5r50KETsq1Zw - XfvDMGKP/fJUPIn2WL4c6vr+B+ke3r5/K96/Hi5ndrXg/oBpLemzpWezg1lcCYzGNeK6UhppY41M - uVi1SOP6clxLNfIspm+DQWngoJ3tSJH0R0OESKq8TWGmjx4Q9gQrpcVyOQ/L9uK+FyDSCWg0FRZk - oYmF4Voe3W4wyN4ouIdS1VLqlOJVg5Te+GPSFrEmKLKrwPVw1m+bHzupE95L9G/nCKcZuDbkWWWn - ebFjvx9X5BAxkqSqRUOGVTpRcMiM9JmDOyfZ0dgj/lohPJgUkbmGBkqE7llMYsQscN2/9R8+OL/0 - ghn0j6aSQwr+b5gQHlzK2hax5AwJmISpzmgaIc+ogK8l4gph+3hFNK6QgQ48EobHZphAC+wDvMyo - iVxB0gkWKAhJzm/7B+EcMQEXnloSzdMEgv+rv+n/AqhHO/tTBgAA - headers: - content-encoding: [gzip] - content-length: ['495'] - content-type: [application/json] - status: {code: 200, message: OK} -- request: - body: null - headers: {} - method: GET - uri: https://api.balancedpayments.com:443/customers/CU2Uomy8gvhh6SdpAqQO2wHv/bank_accounts?limit=10&offset=0 - response: - body: - string: !!binary | - H4sIAAAAAAAAA61UXW+bMBR9769APOxpTbADJESqpmTqVm1do63rpnWakGObxApfNSYLivjvsx0I - kIapD31B4t7re8895+juLwzDXKJ44yOMkzwWmTk1fsugYez1V6Z5kgsWr/w4j5aUy7wJILBsOJlA - 821dpHvEKKIq//P69vbe+DD79nFhzGd3n427WVNZDfJFkepivKZ4I/s3FXWbmySi3PiEiiYVsnij - INbgJDycZ0IVql7vH+BDEhWT1Xa9du9JOnv6uoB/b7bHBifb+lvKWcAwEiyJZYM4D8Nqo/K4Gkax - jzklTMgKwXPaZDhFghIfqYwJLWBfWuNLC3wHYDqCU+gMHNe2vcljs0AgN6U85SzWbwjCrgNs4hEy - QgCTMcIedIgztj1qjawJhjIfIDjGjuUiGiwt7C0hcAEIAs9zvaZxnpL/YnEH0PUcx25hWXMaKBDD - jgGG8xn8sRrz+cr9wh+jBXd3xdP1L0yaWREVSInQcFSL2nhkt9vB0Qi1dCeE0+xUPCaKiveaVSmR - VJnC82HwPJwJufjzcJrIROjjhJxJaq/zop09qzuhSy17gMKs0Z0RRVsvT7pTKb9/1E5mzZYOmyHK - tPLD2rfZsM+1XV3ehSxi4gpYb5IgyKi4sipuzZjuVEtl3gOJ5lHZ1xuip8spwKpmHFDISB1IOd2y - JFcKt6CIRKqg3lXPAsZfjwBJqfagckzrLnQv2kCLqGCdOn3fMf6AkXJY1VZgu/n2X+dyvLB3+9hk - tXjdEe1j1nLICdC6quxpoo/VC0EdLlsPnN6NNZmdfYYnGHuflqZS7aL8B/8D0Fl7BgAA - headers: - content-encoding: [gzip] - content-length: ['621'] - content-type: [application/json] - status: {code: 200, message: OK} -- request: - body: '{"amount": 1500.00, "description": "homer"}' - headers: {} - method: POST - uri: https://api.balancedpayments.com:443/bank_accounts/BA2Vg7rBg6MrZmOr6xyqEYcd/credits - response: - body: {string: !!python/unicode "{\n \"credits\": [\n {\n \"status\": - \"succeeded\",\n \"description\": \"homer\",\n \"links\": {\n \"customer\": - \"CU2Uomy8gvhh6SdpAqQO2wHv\",\n \"destination\": \"BA2Vg7rBg6MrZmOr6xyqEYcd\",\n - \ \"order\": null\n },\n \"updated_at\": \"2014-07-01T11:32:59.459492Z\",\n - \ \"created_at\": \"2014-07-01T11:32:59.196481Z\",\n \"transaction_number\": - \"CR642-211-6199\",\n \"failure_reason\": null,\n \"currency\": - \"USD\",\n \"amount\": 1500,\n \"failure_reason_code\": null,\n - \ \"meta\": {},\n \"href\": \"/credits/CR3x5EJmWYUuxmxNIzyYmDkl\",\n - \ \"appears_on_statement_as\": \"example.com\",\n \"id\": \"CR3x5EJmWYUuxmxNIzyYmDkl\"\n - \ }\n ],\n \"links\": {\n \"credits.order\": \"/orders/{credits.order}\",\n - \ \"credits.customer\": \"/customers/{credits.customer}\",\n \"credits.destination\": - \"/resources/{credits.destination}\",\n \"credits.reversals\": \"/credits/{credits.id}/reversals\",\n - \ \"credits.events\": \"/credits/{credits.id}/events\"\n }\n}"} - headers: - content-length: ['955'] - content-type: [application/json] - status: {code: 201, message: CREATED} -- request: - body: null - headers: {} - method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr - response: - body: - string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIkp028NXtJbcU6aEtCmFNshURiXT4CGIY+vcubUmmSaXs - RYfdmSF3dsTjTZblxGojO6Z0vsl+YiHLjqcvtgR0DKvCtu2HsdZy8eygIwhhWlpFQiDWKdOGCzBc - ikFlEOknNbunYBitwSAir5blerH8tFiWT2W5WVWbqrpd35X398sf+UQhiiUoq2p993HlUajc1Z0U - pgmH4dQdu/1Wfd3yPw/bl8fP9PvjF/LUvK4e3tTlzH0jRThg3ij229GLycEirYRGkwaEqbUBY52R - uZCLDgxpLsd1zEBgMXtx0DKPHHSzHRiocDSgVDEdbIpwcwiAuCdcKavmy2VcdhcPvUCRvcRGWxNJ - Z5pEWmHUwe9Gg+ysxntoXc+lTmtRt6DNOhyTdcDbqMivAtfjWb9cftykXngv0b+dIpwX6Nopz7o4 - Tosd+v2wIo9IQNG6kS09rdKLgkfmtC883DnJnsYOxHMN5GRSQuYaGilRtuMpiQEzw/X/1nd88H7p - GTPYm2FKYAr+b5gYHl3K2Zaw5AyJmJTrvTUsQZ5QEd8oEBqIe7wSGlfISAcfCStSM4ygGfYrvszQ - Jq6g2AiLFKSi57f9H+EcMBEXn1qazNMIwv+rv+n/AoxtLhJTBgAA - headers: - content-encoding: [gzip] - content-length: ['495'] - content-type: [application/json] - status: {code: 200, message: OK} -- request: - body: null - headers: {} - method: GET - uri: https://api.balancedpayments.com:443/customers/CU2Uomy8gvhh6SdpAqQO2wHv - response: - body: - string: !!binary | - H4sIAAAAAAAAA41Uy27bMBC85ysEnevIUoxY9S3opbeiaHJpUQg0yUREJFLhw6lh6N+7lCWZJtWw - Fx12Z4bc2RFPN0mSYqO0aKlU6S75BYUkOQ1faHHUUqhy0zSfplrD+KuFTiCAKWEk9oFQJ1RpxpFm - go8qo0g/q5mOIE1JhTQg0mKdb1br7WqdP+b57q7YFZvbsvy83RY/05mCJY1QtuXd5r50KETsq1Zw - XfvDMGKP/fJUPIn2WL4c6vr+B+ke3r5/K96/Hi5ndrXg/oBpLemzpWezg1lcCYzGNeK6UhppY41M - uVi1SOP6clxLNfIspm+DQWngoJ3tSJH0R0OESKq8TWGmjx4Q9gQrpcVyOQ/L9uK+FyDSCWg0FRZk - oYmF4Voe3W4wyN4ouIdS1VLqlOJVg5Te+GPSFrEmKLKrwPVw1m+bHzupE95L9G/nCKcZuDbkWWWn - ebFjvx9X5BAxkqSqRUOGVTpRcMiM9JmDOyfZ0dgj/lohPJgUkbmGBkqE7llMYsQscN2/9R8+OL/0 - ghn0j6aSQwr+b5gQHlzK2hax5AwJmISpzmgaIc+ogK8l4gph+3hFNK6QgQ48EobHZphAC+wDvMyo - iVxB0gkWKAhJzm/7B+EcMQEXnloSzdMEgv+rv+n/AqhHO/tTBgAA - headers: - content-encoding: [gzip] - content-length: ['495'] - content-type: [application/json] - status: {code: 200, message: OK} -- request: - body: null - headers: {} - method: GET - uri: https://api.balancedpayments.com:443/customers/CU2Uomy8gvhh6SdpAqQO2wHv/credits?limit=10&offset=0 - response: - body: - string: !!binary | - H4sIAAAAAAAAA61UW2/TMBh936+I/MATbeKszZZKE9pNAiSY2CioQygyjttai53Ml5JS5b9ju3GS - FVU8wEuUfLdzznfJ7iQIABYkp0qCWfDNfAbBzj2NQyqktLUDqTEmJCc5eO2dOZFY0ErRktuIdcmI - 6L0F5U8209eyMFoqF2Sir+fxvGTb89VmvU4e8ury+dNd/PPtpitg4g2Aohx5gKvL+MvqTFytkg/i - kd2JpN4+3y5wz8iklCJ39bkuipZn0xHWVY4UyTOkLIM4gpNRdDaK4GcIZ6fxbJqOJ9N0ksaPvQrT - mb+kwDSZnMNBihKIS4Qt64xr9qPVe59M4lEM4SiBadoDLBEttCCZwZGuj5Z5xxhrIQjHW8t3/nDT - pyFWam5lwGkUdeEvi2W4zMlhRUYUslPpu7IWZGnrh+0WhNf3p/X09j37upjrmtUf3/3aLtjNUzFA - ryqChMyMQrshhBGuMuT2hNSIVQUZ45L18TS3rqN13aAa8/xulQBP0ZlBgaQbV+i3R4bHdscreFNQ - RtUFjF6Vy6Uk6iJqqQBOalus7zHo1bfL+S/lHa4dSjsSsMc3Fm+oBNnQ0p3UgIQqFSps3n6SYEnF - /xBtGujGDF7eoj/3sT8WELo3Ge7aFdh7Gt81bzXcTRQq3KC7demSaN6EfUgrxecOb38wyi7Z+/8A - NZjc/ZqOILb+A7iDX4fhJUstMBloHIQ0wLbqpPkNYgZkFQ0FAAA= - headers: - content-encoding: [gzip] - content-length: ['551'] - content-type: [application/json] - status: {code: 200, message: OK} -- request: - body: null - headers: {} - method: GET - uri: https://api.balancedpayments.com:443/customers/CU2Uomy8gvhh6SdpAqQO2wHv/credits?limit=10&offset=0 - response: - body: - string: !!binary | - H4sIAAAAAAAAA61UW2/TMBh936+I/MATbeKszZZKE9pNAiSY2CioQygyjttai53Ml5JS5b9ju3GS - FVU8wEuUfLdzznfJ7iQIABYkp0qCWfDNfAbBzj2NQyqktLUDqTEmJCc5eO2dOZFY0ErRktuIdcmI - 6L0F5U8209eyMFoqF2Sir+fxvGTb89VmvU4e8ury+dNd/PPtpitg4g2Aohx5gKvL+MvqTFytkg/i - kd2JpN4+3y5wz8iklCJ39bkuipZn0xHWVY4UyTOkLIM4gpNRdDaK4GcIZ6fxbJqOJ9N0ksaPvQrT - mb+kwDSZnMNBihKIS4Qt64xr9qPVe59M4lEM4SiBadoDLBEttCCZwZGuj5Z5xxhrIQjHW8t3/nDT - pyFWam5lwGkUdeEvi2W4zMlhRUYUslPpu7IWZGnrh+0WhNf3p/X09j37upjrmtUf3/3aLtjNUzFA - ryqChMyMQrshhBGuMuT2hNSIVQUZ45L18TS3rqN13aAa8/xulQBP0ZlBgaQbV+i3R4bHdscreFNQ - RtUFjF6Vy6Uk6iJqqQBOalus7zHo1bfL+S/lHa4dSjsSsMc3Fm+oBNnQ0p3UgIQqFSps3n6SYEnF - /xBtGujGDF7eoj/3sT8WELo3Ge7aFdh7Gt81bzXcTRQq3KC7demSaN6EfUgrxecOb38wyi7Z+/8A - NZjc/ZqOILb+A7iDX4fhJUstMBloHIQ0wLbqpPkNYgZkFQ0FAAA= - headers: - content-encoding: [gzip] - content-length: ['551'] - content-type: [application/json] - status: {code: 200, message: OK} -- request: - body: null - headers: {} - method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/debits?limit=10&offset=0 - response: - body: - string: !!binary | - H4sIAAAAAAAAA61UXW/aMBR9769AedjDNIhDmvIhVdMIVbWu2toVhLZpikx8Ge4SO7UdxIby32c7 - DgEk9tSXyPbNueeec6+9u+h0vBwU9sadnV7rXYal0jvPT0upeA5C+vG8/zWmv+7il8cp+fZ4k87W - m/BuK3wCS6rk+4zmVF0H6A1frSSoa+S9q3Mx2JpcrMwyd7IWsHqt7JZWJwuQS17T65PmoBCwobyU - xzUornBmcA62ouIVJGvFlUnoZZT9NozOz9qjXuPmifjdSbhqrHPnhMqiVGBRbi39BuQOTjGwAaZM - BRpiG7QHUFL5Luq0OxouCAiLsKsWYbenBLqHJSNnGZrwMYXkpUhrIQLqTUtT7ytvb2Jdl67oh52k - 2kttrlRY2X56skxTAALEOaaDBGQqaKEoZ+aPZ8xAtdHjvthZP2zKuSHfJzDsew1x3H+6fZh+fpjM - Ef/yaYlBjtRLHBz+3Zjajr8lbVtqAlaeGx0bLguCFZAE21vYR8FlFw26KJgFwTjsj6NhD11GaNj/ - 3ipLBfwXMuiF0VUUoAOIEphJnBqrElbmy7r7CzQMuqNh2A1HUSvFW2GalQISTSOttYeKtIlCAEv/ - mHLnT9O2LJzzktkLGg2u6mHQ+o6TJSknZiiOMjYPkr1P1pT9s+EGejENN2j+cbJYjma3VMyivzf3 - a5U9H5AXBWAhE63PzAzk+k4k2E7O5MP9W9jivMigl/K8xVBiwmdz22Iq/f15Uf0DV/ylBTkFAAA= - headers: - content-encoding: [gzip] - content-length: ['569'] - content-type: [application/json] - status: {code: 200, message: OK} -- request: - body: null - headers: {} - method: GET - uri: https://api.balancedpayments.com:443/customers/CU2RCigJCqQDdYQEcThv3Jxr/debits?limit=10&offset=0 - response: - body: - string: !!binary | - H4sIAAAAAAAAA61UXW/aMBR9769AedjDNIhDmvIhVdMIVbWu2toVhLZpikx8Ge4SO7UdxIby32c7 - DgEk9tSXyPbNueeec6+9u+h0vBwU9sadnV7rXYal0jvPT0upeA5C+vG8/zWmv+7il8cp+fZ4k87W - m/BuK3wCS6rk+4zmVF0H6A1frSSoa+S9q3Mx2JpcrMwyd7IWsHqt7JZWJwuQS17T65PmoBCwobyU - xzUornBmcA62ouIVJGvFlUnoZZT9NozOz9qjXuPmifjdSbhqrHPnhMqiVGBRbi39BuQOTjGwAaZM - BRpiG7QHUFL5Luq0OxouCAiLsKsWYbenBLqHJSNnGZrwMYXkpUhrIQLqTUtT7ytvb2Jdl67oh52k - 2kttrlRY2X56skxTAALEOaaDBGQqaKEoZ+aPZ8xAtdHjvthZP2zKuSHfJzDsew1x3H+6fZh+fpjM - Ef/yaYlBjtRLHBz+3Zjajr8lbVtqAlaeGx0bLguCFZAE21vYR8FlFw26KJgFwTjsj6NhD11GaNj/ - 3ipLBfwXMuiF0VUUoAOIEphJnBqrElbmy7r7CzQMuqNh2A1HUSvFW2GalQISTSOttYeKtIlCAEv/ - mHLnT9O2LJzzktkLGg2u6mHQ+o6TJSknZiiOMjYPkr1P1pT9s+EGejENN2j+cbJYjma3VMyivzf3 - a5U9H5AXBWAhE63PzAzk+k4k2E7O5MP9W9jivMigl/K8xVBiwmdz22Iq/f15Uf0DV/ylBTkFAAA= - headers: - content-encoding: [gzip] - content-length: ['569'] - content-type: [application/json] - status: {code: 200, message: OK} -version: 1 diff --git a/tests/py/fixtures/TestPayin.yml b/tests/py/fixtures/TestPayin.yml new file mode 100644 index 0000000000..e8467331f5 --- /dev/null +++ b/tests/py/fixtures/TestPayin.yml @@ -0,0 +1,429 @@ +interactions: +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA6VVW2+bMBR+76+weNhTmwBOyEWqprSbVq1NWq1dO3WakIPtxiqxmW2yoCr/fbaB + AL1o08YDEud+vvOdw9MBAF6CJFbeFHw3HwA8ubcRp4w/WnEtsJa50mJNpJF6p1/h+TdcbBbXH0hx + cQWz2Z2crH5ir/LfHdaBKOMPRGaScW0dx8mI+oMQwmiI6HicQAKjhPrhaBCRBEUDihMKI4yTkAQU + Tow5SSYUUor9IQqjkbcPnGw2sSQqT21cnqfpXsPz9bIsc9t6AvM03mij4kwojdJ4jXSysrVx0ejJ + NmMSaSZ4vBZcW33g7zOsiUZdcCR5MLYOGsFpruxHbW6xY7qItfjlLNoKhLFpQsWhVZyILQhfQsiw + i3sK52cn6i7anKELqPKLW3xzu7yctBBBmjwIWVhroVcGgn3BusiIFSeSYKa7INb9dzBcIv4Yc7R2 + Xp+v5pdfPs0W4PRsdv0RnMwW54dg0Zv1ungqLQnRDZ4FUY3BUiLu+rhlCjXiPMOmahwjx47QDwZH + /ujID26C4XQAp4NhbzwMQhjct1KVkBn7NjkNwEbS7qFkMbHIviIObD4TGcwR4+Dald4ejKGGds2/ + Os+KOonAzmbih4Hf9k5EzrUs4srA5n+xGQniMSZLM44p0DInDX9L2DvzaPGxIMjuYOiHDSHNMjxr + 02Mq3hDJKCMW9k4CS/796nhl76BiIjBjAmV7wFYPsABcaOBY0hq4rb5i0xRQlKqm/pUk1KLSd7el + /xfEleQPJBhEcBLA+3I3dgbKHxYtr7OHXoqUY1G/vlQm9xt3qiztfcrWTB8H/jtBqSL6uJ6hx8m2 + e1a8pqnqDP57cJfVFFofFK/MbiTVQL1Mkg0TuT3ADQs8Lcy5sn4lUzzK5P83bGB0x/rZxS//Cz3M + VJZrs8fNOJ/cVHsM7/p7bVVQqWn/J1qjqPxq7a5alyqRdY1XInX/opo5rVQtfSeZW6A3fCqd7fBg + 9xv4QHhu7QYAAA== + headers: + content-encoding: [gzip] + content-length: ['751'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"amount": 1061, "meta": {"state": "new", "participant_id": 2}, "description": + "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/cards/CC3MHBsW6vHaL3suLVdTVbO9/card_holds + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": null\n },\n \"updated_at\": + \"2014-08-06T16:11:01.762199Z\",\n \"created_at\": \"2014-08-06T16:11:01.543142Z\",\n + \ \"transaction_number\": \"HL899-991-9495\",\n \"expires_at\": \"2014-08-13T16:11:01.671811Z\",\n + \ \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": + 1061,\n \"meta\": {\n \"state\": \"new\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/card_holds/HL21mbAoXnxrw1SuHknlouVa\",\n + \ \"failure_reason_code\": null,\n \"voided_at\": null,\n \"id\": + \"HL21mbAoXnxrw1SuHknlouVa\"\n }\n ],\n \"links\": {\n \"card_holds.events\": + \"/card_holds/{card_holds.id}/events\",\n \"card_holds.card\": \"/cards/{card_holds.card}\",\n + \ \"card_holds.debits\": \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": + \"/debits/{card_holds.debit}\"\n }\n}"} + headers: + content-length: ['944'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"status": "succeeded", "transaction_number": "HL899-991-9495", "description": + "janet", "amount": 1061, "created_at": "2014-08-06T16:11:01.543142Z", "card_href": + "/cards/CC3MHBsW6vHaL3suLVdTVbO9", "updated_at": "2014-08-06T16:11:01.762199Z", + "expires_at": "2014-08-13T16:11:01.671811Z", "failure_reason": null, "currency": + "USD", "is_void": true, "meta": {"state": "cancelled", "participant_id": "2"}, + "debit": null, "failure_reason_code": null, "voided_at": null, "id": "HL21mbAoXnxrw1SuHknlouVa"}' + headers: {} + method: PUT + uri: https://api.balancedpayments.com:443/card_holds/HL21mbAoXnxrw1SuHknlouVa + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": null\n },\n \"updated_at\": + \"2014-08-06T16:11:02.155199Z\",\n \"created_at\": \"2014-08-06T16:11:01.543142Z\",\n + \ \"transaction_number\": \"HL899-991-9495\",\n \"expires_at\": \"2014-08-13T16:11:01.671811Z\",\n + \ \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": + 1061,\n \"meta\": {\n \"state\": \"cancelled\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/card_holds/HL21mbAoXnxrw1SuHknlouVa\",\n + \ \"failure_reason_code\": null,\n \"voided_at\": \"2014-08-06T16:11:02.155202Z\",\n + \ \"id\": \"HL21mbAoXnxrw1SuHknlouVa\"\n }\n ],\n \"links\": {\n + \ \"card_holds.events\": \"/card_holds/{card_holds.id}/events\",\n \"card_holds.card\": + \"/cards/{card_holds.card}\",\n \"card_holds.debits\": \"/card_holds/{card_holds.id}/debits\",\n + \ \"card_holds.debit\": \"/debits/{card_holds.debit}\"\n }\n}"} + headers: + content-length: ['975'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/card_holds?meta.state=new&limit=25&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA92cW2/iWBLH3+dTtHiYp7X73C9Io1UISSCQhCQkJKxWkbHNJVzCxQRIq7/7lg0E + ewY3nm6LHXjoqIVd/I/hR9WpOnXOt9++fMnY1th5ab/1nEkm++U/8MqXL9+Cv3Bt4lne1H89M5na + tus6rpP51/qi407scWfodd4G/h29ludOvM3lXmfQ9U3Xb7aS8m89PWWVk271rn1/07rjzVsX31Ut + m9FPY7jXcRsdD24eTHu9leL3T+np0LE813mx/DsyBGFmIGlQVMU8S0WWCBMLgRipb4Zjj90fmnBT + E6FE2MQbW4OJZfsP+D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Man0 + G+h2RP2wCTYJbC4SSaI+LKsbDDpGBOM7s/oNtRhWEfxF/9gc+O+vyO8/6uNKedFrjgqNcb01586s + UnsVXi1lardr/EOpTbxbbg0b0llEYfkS80j9cVvVKWoCc0bCk3hVBhUnqpghoMNkV1a/5HM5JuiY + 0ql2jOyfT3k+sTt1dDnM9xit3OX4oHDScNPlM0bjaPgM1pQUgSR9V8fIJ5+BiUCCRgpVcSueXAhY + jUeG4nxnx8iKz0AAsibK0pyV7n9NSY71MPdA6zXSvxo5LcYX3u1baIdvGll9jMah8wk+DVfBUXHs + b96AGSasYe6I71ETjiFgJ+moJ7DeSTA2sFA7sib4AcjNmASX0NOUYnzfP5/46kOP8HuODPuLijM6 + 61R7Zzehhd80+IzROBo+EWxPM6HCiRJ01K+QDkygX5NFGo7i/KcmGtbjCezmFHxXfF/xGQgQCjOC + NDvu/g98ykXLvSme1Bv0+vqyby9QzulV043veLvGkk/4+1+/yTAT2fyf6VlwEEN07/6/e51+x/uD + 8N/9W83gaIA/4FyA39+azYnrX1gNGw4LmP+88ZZTA3Ypr5OWTDBCGDbhy77JzHJo8ApavTAcu++d + t+BAis3JARnvzbN6vt1qr3mm2Rn/7edHfloXnC4A4wgfXBE6H8MMzqQIjsMIn4rwbXNCgtlxvn9d + 3bUac+ii/99P48nXsJ1/6fv6GwiZrE/ByKzeNWIUXNxm5b67g93jXN3lP/dv3/8HWZPLbAtEAAA= + headers: + content-encoding: [gzip] + content-length: ['2393'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"status": "succeeded", "debit_href": "/debits/WD1QA4KhW6iCkvZZEgZwaK76", + "transaction_number": "HL562-416-6450", "description": "janet", "created_at": + "2014-08-06T16:10:51.237660Z", "card_href": "/cards/CC3MHBsW6vHaL3suLVdTVbO9", + "updated_at": "2014-08-06T16:10:52.377267Z", "expires_at": "2014-08-13T16:10:51.367763Z", + "failure_reason": null, "currency": "USD", "amount": 2091, "meta": {"state": + "captured", "participant_id": "2"}, "failure_reason_code": null, "voided_at": + null, "id": "HL1PLylfqHbrZgx5dwPWj6tW"}' + headers: {} + method: PUT + uri: https://api.balancedpayments.com:443/card_holds/HL1PLylfqHbrZgx5dwPWj6tW + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": \"WD1QA4KhW6iCkvZZEgZwaK76\"\n + \ },\n \"updated_at\": \"2014-08-06T16:11:03.855360Z\",\n \"created_at\": + \"2014-08-06T16:10:51.237660Z\",\n \"transaction_number\": \"HL562-416-6450\",\n + \ \"expires_at\": \"2014-08-13T16:10:51.367763Z\",\n \"failure_reason\": + null,\n \"currency\": \"USD\",\n \"amount\": 2091,\n \"meta\": + {\n \"state\": \"captured\",\n \"participant_id\": \"2\"\n },\n + \ \"href\": \"/card_holds/HL1PLylfqHbrZgx5dwPWj6tW\",\n \"failure_reason_code\": + null,\n \"voided_at\": null,\n \"id\": \"HL1PLylfqHbrZgx5dwPWj6tW\"\n + \ }\n ],\n \"links\": {\n \"card_holds.events\": \"/card_holds/{card_holds.id}/events\",\n + \ \"card_holds.card\": \"/cards/{card_holds.card}\",\n \"card_holds.debits\": + \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": \"/debits/{card_holds.debit}\"\n + \ }\n}"} + headers: + content-length: ['971'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/card_holds?limit=25&meta.state=new&offset=25 + response: + body: + string: !!binary | + H4sIAAAAAAAAA91WXW+bMBR976+IeOjTIIBtPiJVk9ZsTadMjdakkTpNkWub1S0BZCBtF+W/z3Yg + gNZ0qdSXLg8o4t7rc+7lyOeuj3o9g2BBF7dpTHNj0Psh3/R6a/2UsbzARaneG3lJCGOUUeNDHaQs + J4JnBU8TlXGHE1Y00Zgn96qyPqtCUpmnp+Db6FM+91YjPAZ5Ob6i06ubi3BXLHMpu+GFTE7KOK4A + NzvkMqO4YHSBVYbh2g40bd8EztQOB9AfQM9yfflD1w0dItiLJchyAhTaXqukEDjJMVH9LZJyecOE + QhuNfRuYoeea0PP8BoA9ZlywvMMpkLRqTsgKHRg4oAUQYR6Xgi0ktVzPUDW7a5KUQrCEPCnQ2eWw + QcLLtExU5wCG4S59yQrcHbf6eExVJ+yhPdoMi4ITnuGkWHCqJ2j8NeJbwSIV6jfy6I/GaEjIZ4ge + Vr/JuXs+KrP502Q+a6h1O1qQlCoCnbZWKZcq2o6pE9hS2YuhGVYSeNf6hAMbWQD6Lmhr4UV96hLb + t+3QOUCfbohMhAITObZ9oD41gBMi4MN3rU9nOAzuWUxmyfezdBRFs4trOhVvq889GP+HPoMBBAMA + LOBBxz1Mn3WJvN28zpW79/4MfVOmmhD5wSH6rAHknQ6c4F3rE13yyV08+fX1S5BP/TPgLE8ZTd5W + n3swtvqUz5/KMoyOXRgxzrWVtm77jzFf8uLERccq1dJmciKd5DiNopypQEVb2stj7dRbNzKeMY/D + j9O4koyLqtO2gO03mWArnm4Xk1dQrm9Do0gLHKsDgwoi4uLVA7CVaWpDMrq7TmujsvQaoxeotpGu + G1O1ON30q6yKTCuo/u6K8367ToU29SdoldSLk1Gd2inSweeq2Iol/+ZZZam+jzZ/ADCSHVk9CgAA + headers: + content-encoding: [gzip] + content-length: ['684'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"status": "succeeded", "transaction_number": "HL797-867-4578", "description": + "janet", "amount": 3499, "created_at": "2014-07-31T08:43:33.148675Z", "card_href": + "/cards/CC3MHBsW6vHaL3suLVdTVbO9", "updated_at": "2014-07-31T08:43:33.364123Z", + "expires_at": "2014-08-07T08:43:33.277318Z", "failure_reason": null, "currency": + "USD", "is_void": true, "meta": {"state": "cancelled", "participant_id": "2"}, + "debit": null, "failure_reason_code": null, "voided_at": null, "id": "HL5SiPjlPgJF8sT7G31mCedn"}' + headers: {} + method: PUT + uri: https://api.balancedpayments.com:443/card_holds/HL5SiPjlPgJF8sT7G31mCedn + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": null\n },\n \"updated_at\": + \"2014-08-06T16:11:04.618331Z\",\n \"created_at\": \"2014-07-31T08:43:33.148675Z\",\n + \ \"transaction_number\": \"HL797-867-4578\",\n \"expires_at\": \"2014-08-07T08:43:33.277318Z\",\n + \ \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": + 3499,\n \"meta\": {\n \"state\": \"cancelled\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/card_holds/HL5SiPjlPgJF8sT7G31mCedn\",\n + \ \"failure_reason_code\": null,\n \"voided_at\": \"2014-08-06T16:11:04.618333Z\",\n + \ \"id\": \"HL5SiPjlPgJF8sT7G31mCedn\"\n }\n ],\n \"links\": {\n + \ \"card_holds.events\": \"/card_holds/{card_holds.id}/events\",\n \"card_holds.card\": + \"/cards/{card_holds.card}\",\n \"card_holds.debits\": \"/card_holds/{card_holds.id}/debits\",\n + \ \"card_holds.debit\": \"/debits/{card_holds.debit}\"\n }\n}"} + headers: + content-length: ['975'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA6VVW2+bMBR+76+weNhTmwBOyEWqprSbVq1NWq1dO3WakIPtxiqxmW2yoCr/fbaB + AL1o08YDEud+vvOdw9MBAF6CJFbeFHw3HwA8ubcRp4w/WnEtsJa50mJNpJF6p1/h+TdcbBbXH0hx + cQWz2Z2crH5ir/LfHdaBKOMPRGaScW0dx8mI+oMQwmiI6HicQAKjhPrhaBCRBEUDihMKI4yTkAQU + Tow5SSYUUor9IQqjkbcPnGw2sSQqT21cnqfpXsPz9bIsc9t6AvM03mij4kwojdJ4jXSysrVx0ejJ + NmMSaSZ4vBZcW33g7zOsiUZdcCR5MLYOGsFpruxHbW6xY7qItfjlLNoKhLFpQsWhVZyILQhfQsiw + i3sK52cn6i7anKELqPKLW3xzu7yctBBBmjwIWVhroVcGgn3BusiIFSeSYKa7INb9dzBcIv4Yc7R2 + Xp+v5pdfPs0W4PRsdv0RnMwW54dg0Zv1ungqLQnRDZ4FUY3BUiLu+rhlCjXiPMOmahwjx47QDwZH + /ujID26C4XQAp4NhbzwMQhjct1KVkBn7NjkNwEbS7qFkMbHIviIObD4TGcwR4+Dald4ejKGGds2/ + Os+KOonAzmbih4Hf9k5EzrUs4srA5n+xGQniMSZLM44p0DInDX9L2DvzaPGxIMjuYOiHDSHNMjxr + 02Mq3hDJKCMW9k4CS/796nhl76BiIjBjAmV7wFYPsABcaOBY0hq4rb5i0xRQlKqm/pUk1KLSd7el + /xfEleQPJBhEcBLA+3I3dgbKHxYtr7OHXoqUY1G/vlQm9xt3qiztfcrWTB8H/jtBqSL6uJ6hx8m2 + e1a8pqnqDP57cJfVFFofFK/MbiTVQL1Mkg0TuT3ADQs8Lcy5sn4lUzzK5P83bGB0x/rZxS//Cz3M + VJZrs8fNOJ/cVHsM7/p7bVVQqWn/J1qjqPxq7a5alyqRdY1XInX/opo5rVQtfSeZW6A3fCqd7fBg + 9xv4QHhu7QYAAA== + headers: + content-encoding: [gzip] + content-length: ['751'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"amount": 4357, "meta": {"state": "new", "participant_id": 2}, "description": + "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/cards/CC3MHBsW6vHaL3suLVdTVbO9/card_holds + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": null\n },\n \"updated_at\": + \"2014-08-06T16:11:06.291378Z\",\n \"created_at\": \"2014-08-06T16:11:06.067053Z\",\n + \ \"transaction_number\": \"HL186-761-7704\",\n \"expires_at\": \"2014-08-13T16:11:06.204922Z\",\n + \ \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": + 4357,\n \"meta\": {\n \"state\": \"new\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/card_holds/HL26rEm1tq2J5LBOmP1nEz0A\",\n + \ \"failure_reason_code\": null,\n \"voided_at\": null,\n \"id\": + \"HL26rEm1tq2J5LBOmP1nEz0A\"\n }\n ],\n \"links\": {\n \"card_holds.events\": + \"/card_holds/{card_holds.id}/events\",\n \"card_holds.card\": \"/cards/{card_holds.card}\",\n + \ \"card_holds.debits\": \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": + \"/debits/{card_holds.debit}\"\n }\n}"} + headers: + content-length: ['944'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"status": "succeeded", "transaction_number": "HL186-761-7704", "description": + "janet", "amount": 4357, "created_at": "2014-08-06T16:11:06.067053Z", "card_href": + "/cards/CC3MHBsW6vHaL3suLVdTVbO9", "updated_at": "2014-08-06T16:11:06.291378Z", + "expires_at": "2014-08-13T16:11:06.204922Z", "failure_reason": null, "currency": + "USD", "is_void": true, "meta": {"state": "cancelled", "participant_id": "2"}, + "debit": null, "failure_reason_code": null, "voided_at": null, "id": "HL26rEm1tq2J5LBOmP1nEz0A"}' + headers: {} + method: PUT + uri: https://api.balancedpayments.com:443/card_holds/HL26rEm1tq2J5LBOmP1nEz0A + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": null\n },\n \"updated_at\": + \"2014-08-06T16:11:06.663119Z\",\n \"created_at\": \"2014-08-06T16:11:06.067053Z\",\n + \ \"transaction_number\": \"HL186-761-7704\",\n \"expires_at\": \"2014-08-13T16:11:06.204922Z\",\n + \ \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": + 4357,\n \"meta\": {\n \"state\": \"cancelled\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/card_holds/HL26rEm1tq2J5LBOmP1nEz0A\",\n + \ \"failure_reason_code\": null,\n \"voided_at\": \"2014-08-06T16:11:06.663121Z\",\n + \ \"id\": \"HL26rEm1tq2J5LBOmP1nEz0A\"\n }\n ],\n \"links\": {\n + \ \"card_holds.events\": \"/card_holds/{card_holds.id}/events\",\n \"card_holds.card\": + \"/cards/{card_holds.card}\",\n \"card_holds.debits\": \"/card_holds/{card_holds.id}/debits\",\n + \ \"card_holds.debit\": \"/debits/{card_holds.debit}\"\n }\n}"} + headers: + content-length: ['975'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA6VVW2+bMBR+76+weNhTmwBOyEWqprSbVq1NWq1dO3WakIPtxiqxmW2yoCr/fbaB + AL1o08YDEud+vvOdw9MBAF6CJFbeFHw3HwA8ubcRp4w/WnEtsJa50mJNpJF6p1/h+TdcbBbXH0hx + cQWz2Z2crH5ir/LfHdaBKOMPRGaScW0dx8mI+oMQwmiI6HicQAKjhPrhaBCRBEUDihMKI4yTkAQU + Tow5SSYUUor9IQqjkbcPnGw2sSQqT21cnqfpXsPz9bIsc9t6AvM03mij4kwojdJ4jXSysrVx0ejJ + NmMSaSZ4vBZcW33g7zOsiUZdcCR5MLYOGsFpruxHbW6xY7qItfjlLNoKhLFpQsWhVZyILQhfQsiw + i3sK52cn6i7anKELqPKLW3xzu7yctBBBmjwIWVhroVcGgn3BusiIFSeSYKa7INb9dzBcIv4Yc7R2 + Xp+v5pdfPs0W4PRsdv0RnMwW54dg0Zv1ungqLQnRDZ4FUY3BUiLu+rhlCjXiPMOmahwjx47QDwZH + /ujID26C4XQAp4NhbzwMQhjct1KVkBn7NjkNwEbS7qFkMbHIviIObD4TGcwR4+Dald4ejKGGds2/ + Os+KOonAzmbih4Hf9k5EzrUs4srA5n+xGQniMSZLM44p0DInDX9L2DvzaPGxIMjuYOiHDSHNMjxr + 02Mq3hDJKCMW9k4CS/796nhl76BiIjBjAmV7wFYPsABcaOBY0hq4rb5i0xRQlKqm/pUk1KLSd7el + /xfEleQPJBhEcBLA+3I3dgbKHxYtr7OHXoqUY1G/vlQm9xt3qiztfcrWTB8H/jtBqSL6uJ6hx8m2 + e1a8pqnqDP57cJfVFFofFK/MbiTVQL1Mkg0TuT3ADQs8Lcy5sn4lUzzK5P83bGB0x/rZxS//Cz3M + VJZrs8fNOJ/cVHsM7/p7bVVQqWn/J1qjqPxq7a5alyqRdY1XInX/opo5rVQtfSeZW6A3fCqd7fBg + 9xv4QHhu7QYAAA== + headers: + content-encoding: [gzip] + content-length: ['751'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"amount": 2091, "meta": {"state": "new", "participant_id": 2}, "description": + "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/cards/CC3MHBsW6vHaL3suLVdTVbO9/card_holds + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": null\n },\n \"updated_at\": + \"2014-08-06T16:11:08.304615Z\",\n \"created_at\": \"2014-08-06T16:11:07.963391Z\",\n + \ \"transaction_number\": \"HL776-249-6275\",\n \"expires_at\": \"2014-08-13T16:11:08.220628Z\",\n + \ \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": + 2091,\n \"meta\": {\n \"state\": \"new\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/card_holds/HL28zFNdtqHnFRZsR5P5yYfj\",\n + \ \"failure_reason_code\": null,\n \"voided_at\": null,\n \"id\": + \"HL28zFNdtqHnFRZsR5P5yYfj\"\n }\n ],\n \"links\": {\n \"card_holds.events\": + \"/card_holds/{card_holds.id}/events\",\n \"card_holds.card\": \"/cards/{card_holds.card}\",\n + \ \"card_holds.debits\": \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": + \"/debits/{card_holds.debit}\"\n }\n}"} + headers: + content-length: ['944'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/card_holds?meta.state=new&limit=25&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA91c2W7qWBZ9r6+IeKintu+ZB6RSK4QkkJEQMpBWKzK2CYQhDCYMV/ffe9uGYFfh + 4M61IsFDUIS9Wcdmsfbo8/OPg4OcbY2c59Zb1xnn8gf/gXcODn4Gr3Bs7FnexH8/N57Ytus6rpP7 + 1+qg447tUXvgtd/6/hndF88de+vD3Xa/45uuPmwJ5Z96dMQqh51atXV7/VLlzRsXV2uWzeiHMZzr + uI22Byf3J93uEvHXB/Rk4Fie6zxb/hk5gjAzkDQoqmGepyJPhImFQIw8rZdjj9xPTbipiVAiauKN + rP7Ysv0LfO5Peg135KOVLgghhubUYFSKNYA7G7RH7ji2JmUgsV4TEgLHAJpWuzsZuc+wtHFwE/2L + /bhIezIauX177oPe3RbXSFbvbdL3r5wKKj5O77meFb/d/rfn+tZ9dxq9tQNr5LXt9sDqe89tJ7iD + uX/c4tbIbfqHfqz58QMunePeg307en3B72PaJ965fV+7WC8tfkXP9pvjLyB2We9vbaBReJtiB8Kl + JGIEK1xS4EsEfbX6blp+0stSYfwg3kvWBR1PLu6d2n3jWv8mP4nyucBpHkkTI0oU2srPtYkwleaC + qIhJEj+54IZCwFES+UnlEvjJ1mtCSGAcBfhtfjKtv5mfrHhEz3v3+HDYrONB74JV7dOrjPm5GWNv + +IlBQk2QFkpxWn4GJpgzxmkKfkrKDU6RgZkkW/Uz5GcAQKQUWEYAdo+fw8PhtHjnkPrMcQqFu1aL + i8JptvT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aYf65r + wZYL8af0/91t99reX4T/6Z9qBpsA/AU7APz51myOXf/ActmwLcDs68Yb9gfYhrxqOuaCFcKyCQ8n + JHPh0uAdtHxjMHLf22/B1hPrPQJy3ptndX07tTyt2R7939eP/L0Ogn0EYB3RLSoiO2GYwe4TwcYX + 0f0Pfq73QjDbzq8fy7OWi4kc9P/9MB7/iNr5h36tvoGIyWq/i9zyU2NGwcFNVu6729++zuVZ/nX/ + 8et/Ggo6yvVDAAA= + headers: + content-encoding: [gzip] + content-length: ['2348'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/card_holds?limit=25&meta.state=new&offset=25 + response: + body: + string: !!binary | + H4sIAAAAAAAAA91WXWvbMBR9768IeujT7MgfsqxAGawpS1lGxtq00DGCKslUq2Mb2U7blfz3SYoT + 26ztUuhLF4IJuvfqnHt9oqPHg8EAMKr44iZPeQlGgx96ZTB4tE8dKyta1WYdlDVjQnDBwYdtkIuS + KVlUMs9Mxi+aiaqNpjK7NZXbvRokk3l8HHydfCovo9WEToOynl7w84vrGdkV61wurmWlk7M6TRvA + 9Q65LjitBF9QkwF86IUOxE7gnUMyCvUXuhB7YRhctXSYEi+VBMTFAYow6ZRUimYlZaa/RVYvr4Uy + aJNpHPgOiiInwFFLGYj7QipR9jjFmlbDSQOQWCPADkBCZVorsdDUSjtD0+yuSVYrJTL2YEDnZ+O2 + FbrM68x0HoSE7NKXoqL9cZuXJ0x1Ju66oy2oqiSTBc2qheR2guCvEd8okZjQsJXHcDLFp/5tfjZF + Al6kEfuS3Z/M/HHSUut3tGA5NwR6ba1yqVW0GVMvsKHyLIZl2EjgXesTj8LI9bH+oH31qUuQ68WI + wGgPfWIYOCTynTCKcPtqXtSnBSBeGHvd/8z70ycaM3YSorvVb3bqn07q4vLh2+X8bfX5DMZ/o89w + BJEbhNgP9j4/bQnEEBJvD336BDkIxQ7yINxTnxbAIyjA4bs+P73xOL4VKZtn3z/nkySZz674uXpb + fT6DsdGnfv40lgF6dgFSWlor7Zz2H1O5lNWRjw5NqmvN5Eg7yWGeJKUwgYa2tpf7rVNv3Ag8YR77 + b2dxNRkfNbttALsrhRIrmW8uJq+gvFUbqPKKpmbDuIFIpHr1AKAxTWtIoH/X6dyoXHuNsReorpE+ + tqbqSr4eNlkNmU7Q/NwVl8NunQmtt6+gU7K9OIFm116RDT5VJVYi+zfPJsv0fbD+A55alHY9CgAA + headers: + content-encoding: [gzip] + content-length: ['684'] + content-type: [application/json] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/py/fixtures/TestSyncWithBalanced.yml b/tests/py/fixtures/TestSyncWithBalanced.yml new file mode 100644 index 0000000000..afd3abaff3 --- /dev/null +++ b/tests/py/fixtures/TestSyncWithBalanced.yml @@ -0,0 +1,306 @@ +interactions: +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA6VVW2+bMBR+76+weNhTmwBOyEWqprSbVq1NWq1dO3WakIPtxiqxmW2yoCr/fbaB + AL1o08YDEud+vvOdw9MBAF6CJFbeFHw3HwA8ubcRp4w/WnEtsJa50mJNpJF6p1/h+TdcbBbXH0hx + cQWz2Z2crH5ir/LfHdaBKOMPRGaScW0dx8mI+oMQwmiI6HicQAKjhPrhaBCRBEUDihMKI4yTkAQU + Tow5SSYUUor9IQqjkbcPnGw2sSQqT21cnqfpXsPz9bIsc9t6AvM03mij4kwojdJ4jXSysrVx0ejJ + NmMSaSZ4vBZcW33g7zOsiUZdcCR5MLYOGsFpruxHbW6xY7qItfjlLNoKhLFpQsWhVZyILQhfQsiw + i3sK52cn6i7anKELqPKLW3xzu7yctBBBmjwIWVhroVcGgn3BusiIFSeSYKa7INb9dzBcIv4Yc7R2 + Xp+v5pdfPs0W4PRsdv0RnMwW54dg0Zv1ungqLQnRDZ4FUY3BUiLu+rhlCjXiPMOmahwjx47QDwZH + /ujID26C4XQAp4NhbzwMQhjct1KVkBn7NjkNwEbS7qFkMbHIviIObD4TGcwR4+Dald4ejKGGds2/ + Os+KOonAzmbih4Hf9k5EzrUs4srA5n+xGQniMSZLM44p0DInDX9L2DvzaPGxIMjuYOiHDSHNMjxr + 02Mq3hDJKCMW9k4CS/796nhl76BiIjBjAmV7wFYPsABcaOBY0hq4rb5i0xRQlKqm/pUk1KLSd7el + /xfEleQPJBhEcBLA+3I3dgbKHxYtr7OHXoqUY1G/vlQm9xt3qiztfcrWTB8H/jtBqSL6uJ6hx8m2 + e1a8pqnqDP57cJfVFFofFK/MbiTVQL1Mkg0TuT3ADQs8Lcy5sn4lUzzK5P83bGB0x/rZxS//Cz3M + VJZrs8fNOJ/cVHsM7/p7bVVQqWn/J1qjqPxq7a5alyqRdY1XInX/opo5rVQtfSeZW6A3fCqd7fBg + 9xv4QHhu7QYAAA== + headers: + content-encoding: [gzip] + content-length: ['751'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"amount": 2091, "meta": {"state": "new", "participant_id": 2}, "description": + "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/cards/CC3MHBsW6vHaL3suLVdTVbO9/card_holds + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": null\n },\n \"updated_at\": + \"2014-08-06T16:17:44.653585Z\",\n \"created_at\": \"2014-08-06T16:17:44.440285Z\",\n + \ \"transaction_number\": \"HL523-391-5751\",\n \"expires_at\": \"2014-08-13T16:17:44.565352Z\",\n + \ \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": + 2091,\n \"meta\": {\n \"state\": \"new\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/card_holds/HL1xrj6i5knWhOvt2SSAPCXS\",\n + \ \"failure_reason_code\": null,\n \"voided_at\": null,\n \"id\": + \"HL1xrj6i5knWhOvt2SSAPCXS\"\n }\n ],\n \"links\": {\n \"card_holds.events\": + \"/card_holds/{card_holds.id}/events\",\n \"card_holds.card\": \"/cards/{card_holds.card}\",\n + \ \"card_holds.debits\": \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": + \"/debits/{card_holds.debit}\"\n }\n}"} + headers: + content-length: ['944'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: '{"amount": 1061, "meta": {"exchange_id": 1, "participant_id": 2}, "description": + "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/card_holds/HL1xrj6i5knWhOvt2SSAPCXS/debits + response: + body: {string: !!python/unicode "{\n \"debits\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"customer\": + \"CU3KXdyvNSDeyLP3pAWr9hqd\",\n \"source\": \"CC3MHBsW6vHaL3suLVdTVbO9\",\n + \ \"order\": null,\n \"dispute\": null\n },\n \"updated_at\": + \"2014-08-06T16:17:45.687922Z\",\n \"created_at\": \"2014-08-06T16:17:45.209792Z\",\n + \ \"transaction_number\": \"W946-597-2965\",\n \"failure_reason\": + null,\n \"currency\": \"USD\",\n \"amount\": 1061,\n \"failure_reason_code\": + null,\n \"meta\": {\n \"exchange_id\": \"1\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/debits/WD1yiCx5knt1C67Mm97Rhyvj\",\n \"appears_on_statement_as\": + \"BAL*example.com\",\n \"id\": \"WD1yiCx5knt1C67Mm97Rhyvj\"\n }\n + \ ],\n \"links\": {\n \"debits.customer\": \"/customers/{debits.customer}\",\n + \ \"debits.dispute\": \"/disputes/{debits.dispute}\",\n \"debits.source\": + \"/resources/{debits.source}\",\n \"debits.order\": \"/orders/{debits.order}\",\n + \ \"debits.refunds\": \"/debits/{debits.id}/refunds\",\n \"debits.events\": + \"/debits/{debits.id}/events\"\n }\n}"} + headers: + content-length: ['1067'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/debits?meta.exchange_id=1&limit=25&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA51U32vbMBB+718R/NCHsSS2Uzt1IIw2eSgs3cb6I2NjGEW6LGpt2dOPkBD8v0+S + ldgOlEFfjO5Od9993511uOj1vBwk8ia9gz5rK0NCassbElhRKT5lNKdyGkaX5toAdniD2B9IKZkG + l8V6LUBOfe9jnctgZ3KZyjLn2XBYv7eaRdbJYeSK1XDa4ztHyWFLCyW6mLKQKNOuwN1aU/4OSppR + ZQp4GWWvBsHpU8sywErIIgduyR0NMTychaujNM5PqCiVhFqS+twkueB5DmyBSdPBcSYnFEqqoYs6 + rg6m4MS1Zk8NhDXPAfSMFCNvIhzDXQhRKI5rIhxqo4Gp7co7iVj3pTn8sptSa6nFFRJJOz9PKIwB + CBCnmA4SEJjTUtKCmRsviIFsot252N1tD2X2NPr8g+y3Xx7msF98G5U3S55s/jblDfqJw2w2ur+7 + Fct4e4cWI6EWz+TxefU1OcHp20dRm/W2oM1ITcDSc6tjw6okSAJJkf2rQj+46vvXfT9+DOJJMJ5c + RYP4epyE4c+GGebwn5TQT3ROK0VyxATCRqqUqXxVT3+ZXMX9KBn3wySOmvprRDPFIdUwwkrbZqRF + 5BwY3pt2nx7mTRrKC8UMi8CP3b+l+XWLpbggZik6FTsPjBWl9YwYmKAtc4m4pJiWiEn9yljRzB51 + VT17V4bLebCns130ymQwi8f3eTL+vtlvX1rdlyUgLlItkFk6yPVPlSK7erc3iw+wQ3mZwQAXeZNT + w79Z23ZV6e/vi+ofRK3UuUoFAAA= + headers: + content-encoding: [gzip] + content-length: ['590'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/debits?meta.exchange_id=1&limit=25&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA51U32vbMBB+718R/NCHsSS2Uzt1IIw2eSgs3cb6I2NjGEW6LGpt2dOPkBD8v0+S + ldgOlEFfjO5Od9993511uOj1vBwk8ia9gz5rK0NCassbElhRKT5lNKdyGkaX5toAdniD2B9IKZkG + l8V6LUBOfe9jnctgZ3KZyjLn2XBYv7eaRdbJYeSK1XDa4ztHyWFLCyW6mLKQKNOuwN1aU/4OSppR + ZQp4GWWvBsHpU8sywErIIgduyR0NMTychaujNM5PqCiVhFqS+twkueB5DmyBSdPBcSYnFEqqoYs6 + rg6m4MS1Zk8NhDXPAfSMFCNvIhzDXQhRKI5rIhxqo4Gp7co7iVj3pTn8sptSa6nFFRJJOz9PKIwB + CBCnmA4SEJjTUtKCmRsviIFsot252N1tD2X2NPr8g+y3Xx7msF98G5U3S55s/jblDfqJw2w2ur+7 + Fct4e4cWI6EWz+TxefU1OcHp20dRm/W2oM1ITcDSc6tjw6okSAJJkf2rQj+46vvXfT9+DOJJMJ5c + RYP4epyE4c+GGebwn5TQT3ROK0VyxATCRqqUqXxVT3+ZXMX9KBn3wySOmvprRDPFIdUwwkrbZqRF + 5BwY3pt2nx7mTRrKC8UMi8CP3b+l+XWLpbggZik6FTsPjBWl9YwYmKAtc4m4pJiWiEn9yljRzB51 + VT17V4bLebCns130ymQwi8f3eTL+vtlvX1rdlyUgLlItkFk6yPVPlSK7erc3iw+wQ3mZwQAXeZNT + w79Z23ZV6e/vi+ofRK3UuUoFAAA= + headers: + content-encoding: [gzip] + content-length: ['590'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/customers/CU3KXdyvNSDeyLP3pAWr9hqd/cards?limit=10&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA6VVW2+bMBR+76+weNhTmwBOyEWqprSbVq1NWq1dO3WakIPtxiqxmW2yoCr/fbaB + AL1o08YDEud+vvOdw9MBAF6CJFbeFHw3HwA8ubcRp4w/WnEtsJa50mJNpJF6p1/h+TdcbBbXH0hx + cQWz2Z2crH5ir/LfHdaBKOMPRGaScW0dx8mI+oMQwmiI6HicQAKjhPrhaBCRBEUDihMKI4yTkAQU + Tow5SSYUUor9IQqjkbcPnGw2sSQqT21cnqfpXsPz9bIsc9t6AvM03mij4kwojdJ4jXSysrVx0ejJ + NmMSaSZ4vBZcW33g7zOsiUZdcCR5MLYOGsFpruxHbW6xY7qItfjlLNoKhLFpQsWhVZyILQhfQsiw + i3sK52cn6i7anKELqPKLW3xzu7yctBBBmjwIWVhroVcGgn3BusiIFSeSYKa7INb9dzBcIv4Yc7R2 + Xp+v5pdfPs0W4PRsdv0RnMwW54dg0Zv1ungqLQnRDZ4FUY3BUiLu+rhlCjXiPMOmahwjx47QDwZH + /ujID26C4XQAp4NhbzwMQhjct1KVkBn7NjkNwEbS7qFkMbHIviIObD4TGcwR4+Dald4ejKGGds2/ + Os+KOonAzmbih4Hf9k5EzrUs4srA5n+xGQniMSZLM44p0DInDX9L2DvzaPGxIMjuYOiHDSHNMjxr + 02Mq3hDJKCMW9k4CS/796nhl76BiIjBjAmV7wFYPsABcaOBY0hq4rb5i0xRQlKqm/pUk1KLSd7el + /xfEleQPJBhEcBLA+3I3dgbKHxYtr7OHXoqUY1G/vlQm9xt3qiztfcrWTB8H/jtBqSL6uJ6hx8m2 + e1a8pqnqDP57cJfVFFofFK/MbiTVQL1Mkg0TuT3ADQs8Lcy5sn4lUzzK5P83bGB0x/rZxS//Cz3M + VJZrs8fNOJ/cVHsM7/p7bVVQqWn/J1qjqPxq7a5alyqRdY1XInX/opo5rVQtfSeZW6A3fCqd7fBg + 9xv4QHhu7QYAAA== + headers: + content-encoding: [gzip] + content-length: ['751'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"amount": 3499, "meta": {"state": "new", "participant_id": 2}, "description": + "janet"}' + headers: {} + method: POST + uri: https://api.balancedpayments.com:443/cards/CC3MHBsW6vHaL3suLVdTVbO9/card_holds + response: + body: {string: !!python/unicode "{\n \"card_holds\": [\n {\n \"status\": + \"succeeded\",\n \"description\": \"janet\",\n \"links\": {\n \"card\": + \"CC3MHBsW6vHaL3suLVdTVbO9\",\n \"debit\": null\n },\n \"updated_at\": + \"2014-08-06T16:17:48.014432Z\",\n \"created_at\": \"2014-08-06T16:17:47.797164Z\",\n + \ \"transaction_number\": \"HL440-067-6287\",\n \"expires_at\": \"2014-08-13T16:17:47.917087Z\",\n + \ \"failure_reason\": null,\n \"currency\": \"USD\",\n \"amount\": + 3499,\n \"meta\": {\n \"state\": \"new\",\n \"participant_id\": + \"2\"\n },\n \"href\": \"/card_holds/HL1Bdodkf2ZG8tmnnq5IyD3q\",\n + \ \"failure_reason_code\": null,\n \"voided_at\": null,\n \"id\": + \"HL1Bdodkf2ZG8tmnnq5IyD3q\"\n }\n ],\n \"links\": {\n \"card_holds.events\": + \"/card_holds/{card_holds.id}/events\",\n \"card_holds.card\": \"/cards/{card_holds.card}\",\n + \ \"card_holds.debits\": \"/card_holds/{card_holds.id}/debits\",\n \"card_holds.debit\": + \"/debits/{card_holds.debit}\"\n }\n}"} + headers: + content-length: ['944'] + content-type: [application/json] + status: {code: 201, message: CREATED} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/debits?meta.exchange_id=2&limit=25&offset=0 + response: + body: {string: !!python/unicode "{\n \"meta\": {\n \"last\": \"/debits?limit=25&meta.exchange_id=2&offset=0\",\n + \ \"next\": null,\n \"href\": \"/debits?limit=25&meta.exchange_id=2&offset=0\",\n + \ \"limit\": 25,\n \"offset\": 0,\n \"previous\": null,\n \"total\": + 0,\n \"first\": \"/debits?limit=25&meta.exchange_id=2&offset=0\"\n },\n + \ \"links\": {},\n \"debits\": []\n}"} + headers: + content-length: ['320'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/debits?meta.exchange_id=2&limit=25&offset=0 + response: + body: {string: !!python/unicode "{\n \"meta\": {\n \"last\": \"/debits?limit=25&meta.exchange_id=2&offset=0\",\n + \ \"next\": null,\n \"href\": \"/debits?limit=25&meta.exchange_id=2&offset=0\",\n + \ \"limit\": 25,\n \"offset\": 0,\n \"previous\": null,\n \"total\": + 0,\n \"first\": \"/debits?limit=25&meta.exchange_id=2&offset=0\"\n },\n + \ \"links\": {},\n \"debits\": []\n}"} + headers: + content-length: ['320'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/credits?meta.exchange_id=4&limit=25&offset=0 + response: + body: {string: !!python/unicode "{\n \"credits\": [],\n \"meta\": {\n \"last\": + \"/credits?limit=25&meta.exchange_id=4&offset=0\",\n \"next\": null,\n + \ \"href\": \"/credits?limit=25&meta.exchange_id=4&offset=0\",\n \"limit\": + 25,\n \"offset\": 0,\n \"previous\": null,\n \"total\": 0,\n \"first\": + \"/credits?limit=25&meta.exchange_id=4&offset=0\"\n },\n \"links\": {}\n}"} + headers: + content-length: ['324'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/credits?meta.exchange_id=4&limit=25&offset=0 + response: + body: {string: !!python/unicode "{\n \"credits\": [],\n \"meta\": {\n \"last\": + \"/credits?limit=25&meta.exchange_id=4&offset=0\",\n \"next\": null,\n + \ \"href\": \"/credits?limit=25&meta.exchange_id=4&offset=0\",\n \"limit\": + 25,\n \"offset\": 0,\n \"previous\": null,\n \"total\": 0,\n \"first\": + \"/credits?limit=25&meta.exchange_id=4&offset=0\"\n },\n \"links\": {}\n}"} + headers: + content-length: ['324'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/credits?meta%5Bcontains%5D=exchange_id&limit=25&offset=0 + response: + body: {string: !!python/unicode "{\n \"credits\": [],\n \"meta\": {\n \"last\": + \"/credits?limit=25&meta%5Bcontains%5D=exchange_id&offset=0\",\n \"next\": + null,\n \"href\": \"/credits?limit=25&meta%5Bcontains%5D=exchange_id&offset=0\",\n + \ \"limit\": 25,\n \"offset\": 0,\n \"previous\": null,\n \"total\": + 0,\n \"first\": \"/credits?limit=25&meta%5Bcontains%5D=exchange_id&offset=0\"\n + \ },\n \"links\": {}\n}"} + headers: + content-length: ['360'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: null + headers: {} + method: GET + uri: https://api.balancedpayments.com:443/debits?meta%5Bcontains%5D=exchange_id&limit=25&offset=0 + response: + body: + string: !!binary | + H4sIAAAAAAAAA61UTY/aMBC9769AkXYPVYEkkLBZCVULHFYq21bdD6pWVWTsoXg3cVJ/IBDiv9d2 + DEmQVj20l8gz45k3783E+4tOx8tBIu+ms9dnbWVISG15fQJLKsWHjOZUjsPoyly7jCa4YBJRJi6j + 2Ri2eI3YL0gpuSpWKwFy7HvvqzoMtqYOU1nmPGsOq/9R2XakC4WRK1xBa4/vHCWHDS2UaOPLQqJM + uwJ3a0X5P1LVTA+mmJdR9mrQnIaVdD2shCxy4Jb00RD9/Vn4cJTM+QkVpZJQSVWd6yQXPM+BDTBp + OjjO7YRCyaHvoo63gyk4ca3ZUw1hzXMAPTvFyJsIx3AbQhSK44oIh8qoYSr74J1ErPrSHH7YDaq0 + 1OIKiaSdpScUxgAEiFNMBwkIzGkpacHMjRfEQNbR9lzsfjeHMn0afPxGdptPDzPYzb8MytsFT9a/ + 6/IG/cRhOh3c303EIt7coflAqPkzeXxefk5OcPr2UdR67S1oPVITsPTc6tiwKgmSQFJk/7zQD4Zd + /7rrx49BfBOMboZRL74eJWH4vWaGOfwlJfQTndNIkRwxgbCRKmUqX1bTXyTDuBslo26YxFFdf4Vo + pjikGkZYaZuMtIicA8M70+7Tw6xOQ3mhmGER+LH7zzS/drEUF8QsRati6xGyojQeFwMTNGUuEZcU + 0xIxqd8eK5rZo7aqZ+9NfzELdnS6jV6ZDKbx6D5PRl/Xu81Lo/uyBMRFqgUySwe5/qlSZFdvcjt/ + B1uUlxn0cJHXORX8m7VtVwf9/Xlx+AMyt13lbgUAAA== + headers: + content-encoding: [gzip] + content-length: ['601'] + content-type: [application/json] + status: {code: 200, message: OK} +- request: + body: '{"status": "succeeded", "source_href": "/resources/CC3MHBsW6vHaL3suLVdTVbO9", + "transaction_number": "W946-597-2965", "description": "janet", "created_at": + "2014-08-06T16:17:45.209792Z", "appears_on_statement_as": "BAL*example.com", + "updated_at": "2014-08-06T16:17:45.687922Z", "order": null, "currency": "USD", + "amount": 1061, "meta": {"participant_id": "2"}, "customer_href": "/customers/CU3KXdyvNSDeyLP3pAWr9hqd", + "failure_reason_code": null, "failure_reason": null, "id": "WD1yiCx5knt1C67Mm97Rhyvj", + "dispute": null}' + headers: {} + method: PUT + uri: https://api.balancedpayments.com:443/debits/WD1yiCx5knt1C67Mm97Rhyvj + response: + body: + string: !!binary | + H4sIAAAAAAAAA31Sy27bMBC85ysMHYvakmzr5VtiHwLUaYvm4aJBIdDkBmYiUSofRgRD/x5SLyoO + 0gshcndmd0ZzuphMHAJ7KoWzmjzq22Ryak79LiSSyrw7QmEMQIA4X/siAYE5LSUtmOl4RgykrWaU + vRhkz6XZsBKyyIGb7vX94ttvUh2/326g2v5clJc7nhz+WXozvVAcQ9O9XtxcX4ldeLxG24VQ2wdy + 97D/kQzjdHfBSUPNVJb1OxppVJRKGhZT6HavBxGqJEgCSZE0c+aev5x68dQL7/xw5UerwJvFcRD7 + 8R+rDHP4H2QZzOZeEiXzEURyxATCxqqUqXzferBLluE0SKLpPAkDy/+EaKY4pHqMaKwdK9Imcg4M + V2bd+9uNhaG8UMyo8L3QH/S9J0txQXorhpYcJNKw0Y8qEZcU0xIxmVLSGON8cO7A4cmU3DY87m7j + V3T9Grww6a/D6CZPol+H6vg82rAsAXGRahNMsCAHzY+aeF1dbr/AK8rLDGa4yC2mHf8pd7NVrc+/ + Ro7zPnRdrGfj3Ln9RbindvGhXHdTe5hNjtbYpsiCuodzjI2sy6G9WEx7P4f0uXXc5su2N9fzbm26 + YqTxrDe+10FJrYe25fbn9krgqJ3+FNNVtX/1Rf0GIaIZfg8EAAA= + headers: + content-encoding: [gzip] + content-length: ['494'] + content-type: [application/json] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/py/test_billing.py b/tests/py/test_billing.py index 15dd358935..f6703b2f19 100644 --- a/tests/py/test_billing.py +++ b/tests/py/test_billing.py @@ -38,9 +38,9 @@ def test_credit_card_page_loads_when_there_is_a_card(self): actual = self.client.GET('/credit-card.html', auth_as='janet').body.decode('utf8') assert expected in actual - def test_credit_card_page_loads_when_there_is_an_account_but_no_card(self): + def test_credit_card_page_shows_card_failing(self): self.db.run( "UPDATE participants " - "SET last_bill_result='NoResultFound()'" + "SET last_bill_result='Some error'" "WHERE username='janet'" ) @@ -91,13 +91,10 @@ def test_receipt_page_loads (self): ).save() card.associate_to_customer(customer_href) - self.make_participant('alice', claimed_time='now', balanced_customer_href=customer_href) + alice = self.make_participant('alice', claimed_time='now', + balanced_customer_href=customer_href) - ex_id = self.db.one("insert into exchanges " - "(amount, fee, participant) " - "values (113.00, 30.00, 'alice') " - "returning id" - ) + ex_id = self.make_exchange('bill', 113, 30, alice) url_receipt = '/alice/receipts/{}.html'.format(ex_id) actual = self.client.GET(url_receipt, auth_as='alice').body.decode('utf8') assert 'Visa' in actual diff --git a/tests/py/test_billing_exchanges.py b/tests/py/test_billing_exchanges.py new file mode 100644 index 0000000000..c54722ea04 --- /dev/null +++ b/tests/py/test_billing_exchanges.py @@ -0,0 +1,381 @@ +from __future__ import absolute_import, division, print_function, unicode_literals + +from decimal import Decimal as D +import itertools + +import balanced +import mock +import pytest + +from aspen.utils import typecheck +from gittip.billing.exchanges import ( + _prep_hit, + ach_credit, + cancel_card_hold, + capture_card_hold, + create_card_hold, + record_exchange, + record_exchange_result, + skim_credit, + sync_with_balanced, +) +from gittip.exceptions import NegativeBalance, NoBalancedCustomerHref, NotWhitelisted +from gittip.models.participant import Participant +from gittip.testing import Foobar, Harness +from gittip.testing.balanced import BalancedHarness + + +class TestCredits(BalancedHarness): + + def test_ach_credit_withhold(self): + bob = self.make_participant('bob', last_ach_result="failure", balance=20, + balanced_customer_href=self.homer_href, + is_suspicious=False) + withhold = D('1.00') + error = ach_credit(self.db, bob, withhold) + assert error == '' + bob2 = Participant.from_id(bob.id) + assert bob.balance == bob2.balance == 1 + + def test_ach_credit_amount_under_minimum(self): + bob = self.make_participant('bob', last_ach_result="failure", balance=8, + balanced_customer_href=self.homer_href, + is_suspicious=False) + r = ach_credit(self.db, bob, 0) + assert r is None + + @mock.patch('balanced.Customer') + def test_ach_credit_failure(self, Customer): + Customer.side_effect = Foobar + bob = self.make_participant('bob', last_ach_result="failure", balance=20, + balanced_customer_href=self.homer_href, + is_suspicious=False) + + error = ach_credit(self.db, bob, D('1.00')) + bob2 = Participant.from_id(bob.id) + assert bob.last_ach_result == bob2.last_ach_result == error == "Foobar()" + assert bob.balance == bob2.balance == 20 + + def test_ach_credit_no_bank_account(self): + self.make_exchange('bill', 20, 0, self.david) + error = ach_credit(self.db, self.david, D('1.00')) + david = Participant.from_username('david') + assert error == 'NoResultFound()' + assert self.david.last_ach_result == david.last_ach_result == None + + +class TestCardHolds(BalancedHarness): + + def test_create_card_hold_without_cc_details_raises_NoBalancedCustomerHref(self): + alice = self.make_participant('alice') + with self.assertRaises(NoBalancedCustomerHref): + create_card_hold(self.db, alice, D('1.00')) + + def test_create_card_hold_for_suspicious_raises_NotWhitelisted(self): + bob = self.make_participant('bob', is_suspicious=True, + balanced_customer_href='fake_href') + with self.assertRaises(NotWhitelisted): + create_card_hold(self.db, bob, D('1.00')) + + @mock.patch('balanced.Customer') + def test_create_card_hold_failure(self, Customer): + Customer.side_effect = Foobar + hold, error = create_card_hold(self.db, self.janet, D('1.00')) + assert hold is None + assert error == "Foobar()" + + def test_create_card_hold_success(self): + hold, error = create_card_hold(self.db, self.janet, D('1.00')) + janet = Participant.from_id(self.janet.id) + assert isinstance(hold, balanced.CardHold) + assert hold.failure_reason is None + assert hold.amount == 1000 + assert hold.meta['state'] == 'new' + assert error == '' + assert self.janet.balance == janet.balance == 0 + + # Clean up + cancel_card_hold(hold) + + def test_capture_card_hold_full_amount(self): + hold, error = create_card_hold(self.db, self.janet, D('20.00')) + assert error == '' # sanity check + assert hold.meta['state'] == 'new' + + capture_card_hold(self.db, self.janet, D('20.00'), hold) + janet = Participant.from_id(self.janet.id) + assert self.janet.balance == janet.balance == D('20.00') + assert self.janet.last_bill_result == janet.last_bill_result == '' + assert hold.meta['state'] == 'captured' + + def test_capture_card_hold_partial_amount(self): + hold, error = create_card_hold(self.db, self.janet, D('20.00')) + assert error == '' # sanity check + + capture_card_hold(self.db, self.janet, D('15.00'), hold) + janet = Participant.from_id(self.janet.id) + assert self.janet.balance == janet.balance == D('15.00') + assert self.janet.last_bill_result == janet.last_bill_result == '' + + def test_capture_card_hold_too_high_amount(self): + hold, error = create_card_hold(self.db, self.janet, D('20.00')) + assert error == '' # sanity check + + with self.assertRaises(balanced.exc.HTTPError): + capture_card_hold(self.db, self.janet, D('20.01'), hold) + + janet = Participant.from_id(self.janet.id) + assert self.janet.balance == janet.balance == 0 + + # Clean up + cancel_card_hold(hold) + + def test_capture_card_hold_amount_under_minimum(self): + hold, error = create_card_hold(self.db, self.janet, D('20.00')) + assert error == '' # sanity check + + capture_card_hold(self.db, self.janet, D('0.01'), hold) + janet = Participant.from_id(self.janet.id) + assert self.janet.balance == janet.balance == D('9.41') + assert self.janet.last_bill_result == janet.last_bill_result == '' + + def test_create_card_hold_bad_card(self): + customer_href = self.make_balanced_customer() + card = balanced.Card( + number='4444444444444448', + expiration_year=2020, + expiration_month=12 + ).save() + card.associate_to_customer(customer_href) + + bob = self.make_participant('bob', balanced_customer_href=customer_href, + is_suspicious=False) + hold, error = create_card_hold(self.db, bob, D('10.00')) + assert error.startswith('402 Payment Required, ') + + def test_create_card_hold_multiple_cards(self): + customer_href = self.make_balanced_customer() + card = balanced.Card( + number='4242424242424242', + expiration_year=2020, + expiration_month=12 + ).save() + card.associate_to_customer(customer_href) + + card = balanced.Card( + number='4242424242424242', + expiration_year=2030, + expiration_month=12 + ).save() + card.associate_to_customer(customer_href) + + bob = self.make_participant('bob', balanced_customer_href=customer_href, + is_suspicious=False) + hold, error = create_card_hold(self.db, bob, D('10.00')) + assert error == 'MultipleResultsFound()' + + def test_create_card_hold_no_card(self): + customer_href = self.make_balanced_customer() + bob = self.make_participant('bob', balanced_customer_href=customer_href, + is_suspicious=False) + hold, error = create_card_hold(self.db, bob, D('10.00')) + bob2 = Participant.from_id(bob.id) + assert error == 'NoResultFound()' + assert bob.last_bill_result == bob2.last_bill_result == None + + +class TestFees(Harness): + + def prep(self, amount): + """Given a dollar amount as a string, return a 3-tuple. + + The return tuple is like the one returned from _prep_hit, but with the + second value, a log message, removed. + + """ + typecheck(amount, unicode) + out = list(_prep_hit(D(amount))) + out = [out[0]] + out[2:] + return tuple(out) + + def test_prep_hit_basically_works(self): + actual = _prep_hit(D('20.00')) + expected = (2091, + u'2091 cents ($20.00 + $0.91 fee = $20.91)', + D('20.91'), D('0.91')) + assert actual == expected + + def test_prep_hit_full_in_rounded_case(self): + actual = _prep_hit(D('5.00')) + expected = (1000, + u'1000 cents ($9.41 [rounded up from $5.00] + $0.59 fee = $10.00)', + D('10.00'), D('0.59')) + assert actual == expected + + def test_prep_hit_at_ten_dollars(self): + actual = self.prep(u'10.00') + expected = (1061, D('10.61'), D('0.61')) + assert actual == expected + + def test_prep_hit_at_forty_cents(self): + actual = self.prep(u'0.40') + expected = (1000, D('10.00'), D('0.59')) + assert actual == expected + + def test_prep_hit_at_fifty_cents(self): + actual = self.prep(u'0.50') + expected = (1000, D('10.00'), D('0.59')) + assert actual == expected + + def test_prep_hit_at_sixty_cents(self): + actual = self.prep(u'0.60') + expected = (1000, D('10.00'), D('0.59')) + assert actual == expected + + def test_prep_hit_at_eighty_cents(self): + actual = self.prep(u'0.80') + expected = (1000, D('10.00'), D('0.59')) + assert actual == expected + + def test_prep_hit_at_nine_fifteen(self): + actual = self.prep(u'9.15') + expected = (1000, D('10.00'), D('0.59')) + assert actual == expected + + def test_prep_hit_at_nine_forty(self): + actual = self.prep(u'9.40') + expected = (1000, D('10.00'), D('0.59')) + assert actual == expected + + def test_prep_hit_at_nine_forty_one(self): + actual = self.prep(u'9.41') + expected = (1000, D('10.00'), D('0.59')) + assert actual == expected + + def test_prep_hit_at_nine_forty_two(self): + actual = self.prep(u'9.42') + expected = (1002, D('10.02'), D('0.60')) + assert actual == expected + + def test_skim_credit(self): + actual = skim_credit(D('10.00')) + assert actual == (D('10.00'), D('0.00')) + + +class TestRecordExchange(Harness): + + def test_record_exchange_doesnt_update_balance_for_positive_amounts(self): + alice = self.make_participant('alice') + record_exchange( self.db + , 'bill' + , amount=D("0.59") + , fee=D("0.41") + , participant=alice + , status='pre' + ) + alice = Participant.from_username('alice') + assert alice.balance == D('0.00') + + def test_record_exchange_updates_balance_for_negative_amounts(self): + alice = self.make_participant('alice', balance=50) + record_exchange( self.db + , 'ach' + , amount=D('-35.84') + , fee=D('0.75') + , participant=alice + , status='pre' + ) + alice = Participant.from_username('alice') + assert alice.balance == D('13.41') + + def test_record_exchange_fails_if_negative_balance(self): + alice = self.make_participant('alice') + pytest.raises( NegativeBalance + , record_exchange + , self.db + , 'ach' + , amount=D("-10.00") + , fee=D("0.41") + , participant=alice + , status='pre' + ) + + def test_record_exchange_result_restores_balance_on_error(self): + alice = self.make_participant('alice', balance=30) + e_id = record_exchange(self.db, 'ach', D('-27.06'), D('0.81'), alice, 'pre') + assert alice.balance == D('02.13') + record_exchange_result( self.db, e_id, 'failed', 'SOME ERROR', alice) + alice = Participant.from_username('alice') + assert alice.balance == D('30.00') + + def test_record_exchange_result_doesnt_restore_balance_on_success(self): + alice = self.make_participant('alice', balance=50) + e_id = record_exchange(self.db, 'ach', D('-43.98'), D('1.60'), alice, 'pre') + assert alice.balance == D('4.42') + record_exchange_result( self.db, e_id, 'succeeded', None, alice) + alice = Participant.from_username('alice') + assert alice.balance == D('4.42') + + def test_record_exchange_result_updates_balance_for_positive_amounts(self): + alice = self.make_participant('alice', balance=4) + e_id = record_exchange(self.db, 'bill', D('31.59'), D('0.01'), alice, 'pre') + assert alice.balance == D('4.00') + record_exchange_result( self.db, e_id, 'succeeded', None, alice) + alice = Participant.from_username('alice') + assert alice.balance == D('35.59') + + +class TestSyncWithBalanced(BalancedHarness): + + @classmethod + def tearDownClass(cls): + has_exchange_id = balanced.Transaction.f.meta.contains('exchange_id') + credits = balanced.Credit.query.filter(has_exchange_id) + debits = balanced.Debit.query.filter(has_exchange_id) + for t in itertools.chain(credits, debits): + t.meta.pop('exchange_id') + t.save() + super(TestSyncWithBalanced, cls).tearDownClass() + + def test_sync_with_balanced(self): + with mock.patch('gittip.billing.exchanges.record_exchange_result') as rer: + rer.side_effect = Foobar() + hold, error = create_card_hold(self.db, self.janet, D('20.00')) + assert error == '' # sanity check + with self.assertRaises(Foobar): + capture_card_hold(self.db, self.janet, D('10.00'), hold) + exchange = self.db.one("SELECT * FROM exchanges") + assert exchange.status == 'pre' + sync_with_balanced(self.db) + exchange = self.db.one("SELECT * FROM exchanges") + assert exchange.status == 'succeeded' + assert Participant.from_username('janet').balance == 10 + + def test_sync_with_balanced_deletes_charges_that_didnt_happen(self): + with mock.patch('gittip.billing.exchanges.record_exchange_result') as rer \ + , mock.patch('balanced.CardHold.capture') as capture: + rer.side_effect = capture.side_effect = Foobar + hold, error = create_card_hold(self.db, self.janet, D('33.67')) + assert error == '' # sanity check + with self.assertRaises(Foobar): + capture_card_hold(self.db, self.janet, D('7.52'), hold) + exchange = self.db.one("SELECT * FROM exchanges") + assert exchange.status == 'pre' + sync_with_balanced(self.db) + exchanges = self.db.all("SELECT * FROM exchanges") + assert not exchanges + assert Participant.from_username('janet').balance == 0 + + def test_sync_with_balanced_reverts_credits_that_didnt_happen(self): + self.make_exchange('bill', 41, 0, self.homer) + with mock.patch('gittip.billing.exchanges.record_exchange_result') as rer \ + , mock.patch('balanced.Customer') as Customer: + rer.side_effect = Customer.side_effect = Foobar + with self.assertRaises(Foobar): + ach_credit(self.db, self.homer, 0, 0) + exchange = self.db.one("SELECT * FROM exchanges WHERE amount < 0") + assert exchange.status == 'pre' + sync_with_balanced(self.db) + exchanges = self.db.all("SELECT * FROM exchanges WHERE amount < 0") + assert not exchanges + assert Participant.from_username('homer').balance == 41 diff --git a/tests/py/test_billing_payday.py b/tests/py/test_billing_payday.py index 58eda78556..8e945bf822 100644 --- a/tests/py/test_billing_payday.py +++ b/tests/py/test_billing_payday.py @@ -1,114 +1,42 @@ from __future__ import absolute_import, division, print_function, unicode_literals from decimal import Decimal as D -from datetime import datetime import balanced import mock -import pytest -from psycopg2 import IntegrityError -from aspen.utils import typecheck, utcnow -from gittip import billing -from gittip.billing.payday import Payday, skim_credit, LOOP_PACHINKO +from gittip.billing.exchanges import create_card_hold +from gittip.billing.payday import NoPayday, Payday from gittip.exceptions import NegativeBalance from gittip.models.participant import Participant -from gittip.testing import Harness +from gittip.testing import Foobar, Harness from gittip.testing.balanced import BalancedHarness -class PaydayHarness(BalancedHarness): +class TestPayday(BalancedHarness): - def setUp(self): - BalancedHarness.setUp(self) - self.payday = Payday(self.db) - self.alice = self.make_participant('alice', claimed_time='now') - - def fetch_payday(self): - return self.db.one("SELECT * FROM paydays", back_as=dict) - - -class TestPaydayCharge(PaydayHarness): - - def get_numbers(self): - """Return a list of 11 ints: - - nachs - nach_failing - nactive - ncc_failing - ncc_missing - ncharges - npachinko - nparticipants - ntippers - ntips - ntransfers - - """ - payday = self.fetch_payday() - keys = [key for key in sorted(payday) if key.startswith('n')] - return [payday[key] for key in keys] - - def test_charge_without_cc_details_returns_None(self): - self.payday.start() - actual = self.payday.charge(self.alice, D('1.00')) - assert actual is None - - def test_charge_without_cc_marked_as_failure(self): - self.payday.start() - self.payday.charge(self.alice, D('1.00')) - actual = self.get_numbers() - assert actual == [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0] - - @mock.patch('gittip.billing.payday.Payday.charge_on_balanced') - def test_charge_failure_returns_None(self, cob): - cob.return_value = (D('10.00'), D('0.68'), 'FAILED') - self.payday.start() - actual = self.payday.charge(self.janet, D('1.00')) - assert actual is None - - @mock.patch('gittip.billing.payday.Payday.charge_on_balanced') - def test_charge_success_returns_None(self, charge_on_balanced): - charge_on_balanced.return_value = (D('10.00'), D('0.68'), "") - self.payday.start() - actual = self.payday.charge(self.janet, D('1.00')) - assert actual is None - - @mock.patch('gittip.billing.payday.Payday.charge_on_balanced') - def test_charge_success_updates_participant(self, cob): - cob.return_value = (D('10.00'), D('0.68'), "") - self.payday.start() - self.payday.charge(self.janet, D('1.00')) - - janet = Participant.from_username('janet') - expected = {'balance': D('9.32'), 'last_bill_result': ''} - actual = {'balance': janet.balance, - 'last_bill_result': janet.last_bill_result} - assert actual == expected - - @mock.patch('gittip.billing.payday.Payday.charge_on_balanced') - def test_payday_moves_money(self, charge_on_balanced): - charge_on_balanced.return_value = (D('10.00'), D('0.68'), "") + @mock.patch.object(Payday, 'fetch_card_holds') + def test_payday_moves_money(self, fch): self.janet.set_tip_to(self.homer, '6.00') # under $10! - self.payday.run() + fch.return_value = {} + Payday.start().run() janet = Participant.from_username('janet') homer = Participant.from_username('homer') assert homer.balance == D('6.00') - assert janet.balance == D('3.32') + assert janet.balance == D('3.41') - @mock.patch('gittip.billing.payday.Payday.charge_on_balanced') - def test_payday_doesnt_move_money_from_a_suspicious_account(self, charge_on_balanced): - charge_on_balanced.return_value = (D('10.00'), D('0.68'), "") + @mock.patch.object(Payday, 'fetch_card_holds') + def test_payday_doesnt_move_money_from_a_suspicious_account(self, fch): self.db.run(""" UPDATE participants SET is_suspicious = true WHERE username = 'janet' """) self.janet.set_tip_to(self.homer, '6.00') # under $10! - self.payday.run() + fch.return_value = {} + Payday.start().run() janet = Participant.from_username('janet') homer = Participant.from_username('homer') @@ -116,16 +44,16 @@ def test_payday_doesnt_move_money_from_a_suspicious_account(self, charge_on_bala assert janet.balance == D('0.00') assert homer.balance == D('0.00') - @mock.patch('gittip.billing.payday.Payday.charge_on_balanced') - def test_payday_doesnt_move_money_to_a_suspicious_account(self, charge_on_balanced): - charge_on_balanced.return_value = (D('10.00'), D('0.68'), "") + @mock.patch.object(Payday, 'fetch_card_holds') + def test_payday_doesnt_move_money_to_a_suspicious_account(self, fch): self.db.run(""" UPDATE participants SET is_suspicious = true WHERE username = 'homer' """) self.janet.set_tip_to(self.homer, '6.00') # under $10! - self.payday.run() + fch.return_value = {} + Payday.start().run() janet = Participant.from_username('janet') homer = Participant.from_username('homer') @@ -133,9 +61,11 @@ def test_payday_doesnt_move_money_to_a_suspicious_account(self, charge_on_balanc assert janet.balance == D('0.00') assert homer.balance == D('0.00') - def test_payday_moves_money_with_balanced(self): + @mock.patch.object(Payday, 'fetch_card_holds') + def test_payday_moves_money_with_balanced(self, fch): self.janet.set_tip_to(self.homer, '15.00') - self.payday.run() + fch.return_value = {} + Payday.start().run() janet = Participant.from_username('janet') homer = Participant.from_username('homer') @@ -146,191 +76,23 @@ def test_payday_moves_money_with_balanced(self): janet_customer = balanced.Customer.fetch(janet.balanced_customer_href) homer_customer = balanced.Customer.fetch(homer.balanced_customer_href) - homer_credits = homer_customer.credits.all() - assert len(homer_credits) == 1 - assert homer_credits[0].amount == 1500 - assert homer_credits[0].description == 'homer' - - janet_debits = janet_customer.debits.all() - assert len(janet_debits) == 1 - assert janet_debits[0].amount == 1576 # base amount + fee - assert janet_debits[0].description == 'janet' - - -class TestPaydayChargeOnBalanced(PaydayHarness): - - def test_charge_on_balanced(self): - actual = self.payday.charge_on_balanced( 'janet' - , self.janet_href - , D('10.00') # $10.00 USD - ) - assert actual == (D('10.61'), D('0.61'), '') - - def test_charge_on_balanced_small_amount(self): - actual = self.payday.charge_on_balanced( 'janet' - , self.janet_href - , D('0.06') # $0.06 USD - ) - assert actual == (D('10.00'), D('0.59'), '') - - def test_charge_on_balanced_failure(self): - customer_with_bad_card = self.make_balanced_customer() - card = balanced.Card( - number='4444444444444448', - expiration_year=2020, - expiration_month=12 - ).save() - card.associate_to_customer(customer_with_bad_card) - - actual = self.payday.charge_on_balanced( 'whatever username' - , customer_with_bad_card - , D('10.00') - ) - assert actual == (D('10.61'), D('0.61'), '402 Client Error: PAYMENT REQUIRED') - - def test_charge_on_balanced_handles_MultipleFoundError(self): - customer_href = self.make_balanced_customer() - card = balanced.Card( - number='4242424242424242', - expiration_year=2020, - expiration_month=12 - ).save() - card.associate_to_customer(customer_href) - - card = balanced.Card( - number='4242424242424242', - expiration_year=2030, - expiration_month=12 - ).save() - card.associate_to_customer(customer_href) - - actual = self.payday.charge_on_balanced( 'whatever username' - , customer_href - , D('10.00') - ) - assert actual == (D('10.61'), D('0.61'), 'MultipleResultsFound()') - - def test_charge_on_balanced_handles_NotFoundError(self): - customer_with_no_card = self.make_balanced_customer() - actual = self.payday.charge_on_balanced( 'whatever username' - , customer_with_no_card - , D('10.00') - ) - assert actual == (D('10.61'), D('0.61'), 'NoResultFound()') - - -class TestBillingCharges(PaydayHarness): - - def test_mark_missing_funding(self): - self.payday.start() - before = self.fetch_payday() - missing_count = before['ncc_missing'] + created_at = balanced.Transaction.f.created_at - self.payday.mark_missing_funding() + credit = homer_customer.credits.sort(created_at.desc()).first() + assert credit.amount == 1500 + assert credit.description == 'homer' - after = self.fetch_payday() - assert after['ncc_missing'] == missing_count + 1 + debit = janet_customer.debits.sort(created_at.desc()).first() + assert debit.amount == 1576 # base amount + fee + assert debit.description == 'janet' def test_mark_charge_failed(self): - self.payday.start() + payday = Payday.start() before = self.fetch_payday() - fail_count = before['ncc_failing'] - with self.db.get_cursor() as cursor: - self.payday.mark_charge_failed(cursor) - + payday.mark_charge_failed(cursor) after = self.fetch_payday() - assert after['ncc_failing'] == fail_count + 1 - - -class TestPrepHit(PaydayHarness): - - def prep(self, amount): - """Given a dollar amount as a string, return a 3-tuple. - - The return tuple is like the one returned from _prep_hit, but with the - second value, a log message, removed. - - """ - typecheck(amount, unicode) - out = list(self.payday._prep_hit(D(amount))) - out = [out[0]] + out[2:] - return tuple(out) - - def test_prep_hit_basically_works(self): - actual = self.payday._prep_hit(D('20.00')) - expected = (2091, - u'Charging %s 2091 cents ($20.00 + $0.91 fee = $20.91) on %s ' u'... ', - D('20.91'), D('0.91')) - assert actual == expected - - def test_prep_hit_full_in_rounded_case(self): - actual = self.payday._prep_hit(D('5.00')) - expected = (1000, - u'Charging %s 1000 cents ($9.41 [rounded up from $5.00] + ' u'$0.59 fee = $10.00) on %s ... ', - D('10.00'), D('0.59')) - assert actual == expected - - def test_prep_hit_at_ten_dollars(self): - actual = self.prep(u'10.00') - expected = (1061, D('10.61'), D('0.61')) - assert actual == expected - - def test_prep_hit_at_forty_cents(self): - actual = self.prep(u'0.40') - expected = (1000, D('10.00'), D('0.59')) - assert actual == expected - - def test_prep_hit_at_fifty_cents(self): - actual = self.prep(u'0.50') - expected = (1000, D('10.00'), D('0.59')) - assert actual == expected - - def test_prep_hit_at_sixty_cents(self): - actual = self.prep(u'0.60') - expected = (1000, D('10.00'), D('0.59')) - assert actual == expected - - def test_prep_hit_at_eighty_cents(self): - actual = self.prep(u'0.80') - expected = (1000, D('10.00'), D('0.59')) - assert actual == expected - - def test_prep_hit_at_nine_fifteen(self): - actual = self.prep(u'9.15') - expected = (1000, D('10.00'), D('0.59')) - assert actual == expected - - def test_prep_hit_at_nine_forty(self): - actual = self.prep(u'9.40') - expected = (1000, D('10.00'), D('0.59')) - assert actual == expected - - def test_prep_hit_at_nine_forty_one(self): - actual = self.prep(u'9.41') - expected = (1000, D('10.00'), D('0.59')) - assert actual == expected - - def test_prep_hit_at_nine_forty_two(self): - actual = self.prep(u'9.42') - expected = (1002, D('10.02'), D('0.60')) - assert actual == expected - - -class TestBillingPayday(PaydayHarness): - - def test_move_pending_to_balance_for_teams_does_so(self): - self.make_participant('A', number='plural', balance=2, pending=3) - self.payday.move_pending_to_balance_for_teams() - actual = self.db.one("SELECT balance FROM participants WHERE username='A'") - assert actual == 5 - - def test_move_pending_to_balance_for_teams_ignores_new_teams(self): - # See https://github.com/gittip/www.gittip.com/issues/1684 - self.make_participant('A', number='plural', balance=0, pending=None) - self.payday.move_pending_to_balance_for_teams() - actual = self.db.one("SELECT balance FROM participants WHERE username='A'") - assert actual == 0 + assert after['ncc_failing'] == before['ncc_failing'] + 1 def test_update_receiving_amounts_updates_receiving_amounts(self): A = self.make_participant('A') @@ -338,7 +100,7 @@ def test_update_receiving_amounts_updates_receiving_amounts(self): B.set_tip_to(A, D('10.00'), update_tippee=False) assert Participant.from_username('A').receiving == 0 - self.payday.update_receiving_amounts() + Payday.start().update_receiving_amounts() assert Participant.from_username('A').receiving == 10 def test_update_receiving_amounts_includes_taking(self): @@ -349,174 +111,29 @@ def test_update_receiving_amounts_includes_taking(self): assert Participant.from_username('A').receiving == 0 assert Participant.from_username('A').taking == 3 - self.payday.update_receiving_amounts() + Payday.start().update_receiving_amounts() assert Participant.from_username('A').receiving == 13 assert Participant.from_username('A').taking == 3 - @mock.patch('gittip.models.participant.Participant.get_tips_and_total') - def test_charge_and_or_transfer_no_tips(self, get_tips_and_total): - self.db.run(""" - UPDATE participants - SET balance=1 - WHERE username='janet' - """) - - amount = D('1.00') - - ts_start = self.payday.start() - - tips, total = [], amount - - initial_payday = self.fetch_payday() - self.payday.charge_and_or_transfer(ts_start, self.janet, tips, total) - resulting_payday = self.fetch_payday() - - assert initial_payday['ntippers'] == resulting_payday['ntippers'] - assert initial_payday['ntips'] == resulting_payday['ntips'] - assert initial_payday['nparticipants'] + 1 == resulting_payday['nparticipants'] - - @mock.patch('gittip.models.participant.Participant.get_tips_and_total') - @mock.patch('gittip.billing.payday.Payday.tip') - def test_charge_and_or_transfer(self, tip, get_tips_and_total): - self.db.run(""" - UPDATE participants - SET balance=1 - WHERE username='janet' - """) - - ts_start = self.payday.start() - now = datetime.utcnow() - amount = D('1.00') - like_a_tip = {'amount': amount, 'tippee': 'mjallday', 'ctime': now, - 'claimed_time': now} - - # success, success, claimed, failure - tips = [like_a_tip, like_a_tip, like_a_tip, like_a_tip] - total = amount - - ts_start = datetime.utcnow() - - return_values = [1, 1, 0, -1] - return_values.reverse() - - def tip_return_values(*_): - return return_values.pop() - - tip.side_effect = tip_return_values - - initial_payday = self.fetch_payday() - self.payday.charge_and_or_transfer(ts_start, self.janet, tips, total) - resulting_payday = self.fetch_payday() - - assert initial_payday['nparticipants'] + 1 == resulting_payday['nparticipants'] - - @mock.patch('gittip.models.participant.Participant.get_tips_and_total') - @mock.patch('gittip.billing.payday.Payday.charge') - def test_charge_and_or_transfer_short(self, charge, get_tips_and_total): - self.db.run(""" - UPDATE participants - SET balance=1 - WHERE username='janet' - """) - - now = datetime.utcnow() - amount = D('1.00') - like_a_tip = {'amount': amount, 'tippee': 'mjallday', 'ctime': now, - 'claimed_time': now} - - # success, success, claimed, failure - tips = [like_a_tip, like_a_tip, like_a_tip, like_a_tip] - get_tips_and_total.return_value = tips, amount - - ts_start = datetime.utcnow() - - # In real-life we wouldn't be able to catch an error as the charge - # method will swallow any errors and return false. We don't handle this - # return value within charge_and_or_transfer but instead continue on - # trying to use the remaining credit in the user's account to payout as - # many tips as possible. - # - # Here we're hacking the system and throwing the exception so execution - # stops since we're only testing this part of the method. That smells - # like we need to refactor. - - charge.side_effect = Exception() - with self.assertRaises(Exception): - billing.charge_and_or_transfer(ts_start, self.janet) - assert charge.called_with(self.janet.username, - self.janet_href, - amount) - - @mock.patch('gittip.billing.payday.Payday.transfer') @mock.patch('gittip.billing.payday.log') - def test_tip(self, log, transfer): - self.db.run(""" - UPDATE participants - SET balance=1 - WHERE username='janet' - """) - amount = D('1.00') - invalid_amount = D('0.00') - tip = { 'amount': amount - , 'tippee': 'janet' - , 'claimed_time': utcnow() - } - ts_start = utcnow() - - result = self.payday.tip(self.janet, tip, ts_start) - assert result == 1 - result = transfer.called_with('janet', tip['tippee'], tip['amount']) - assert result - - assert log.called_with('SUCCESS: $1 from mjallday to alice.') - - # XXX: Should these tests be broken down to a separate class with the - # common setup factored in to a setUp method. - - # XXX: We should have constants to compare the values to - # invalid amount - tip['amount'] = invalid_amount - result = self.payday.tip(self.janet, tip, ts_start) - assert result == 0 - - tip['amount'] = amount - - # XXX: We should have constants to compare the values to - # not claimed - tip['claimed_time'] = None - result = self.payday.tip(self.janet, tip, ts_start) - assert result == 0 - - # XXX: We should have constants to compare the values to - # claimed after payday - tip['claimed_time'] = utcnow() - result = self.payday.tip(self.janet, tip, ts_start) - assert result == 0 - - ts_start = utcnow() - - # XXX: We should have constants to compare the values to - # transfer failed - transfer.return_value = False - result = self.payday.tip(self.janet, tip, ts_start) - assert result == -1 - - @mock.patch('gittip.billing.payday.log') - def test_start_zero_out_and_get_participants(self, log): + def test_start_prepare(self, log): self.clear_tables() - self.make_participant('bob', balance=10, claimed_time=None, pending=1) - self.make_participant('carl', balance=10, claimed_time='now', pending=1) + self.make_participant('bob', balance=10, claimed_time=None) + self.make_participant('carl', balance=10, claimed_time='now') - ts_start = self.payday.start() + payday = Payday.start() + ts_start = payday.ts_start - self.payday.zero_out_pending(ts_start) - participants = self.payday.get_participants(ts_start) + get_participants = lambda c: c.all("SELECT * FROM payday_participants") + + with self.db.get_cursor() as cursor: + payday.prepare(cursor, ts_start) + participants = get_participants(cursor) expected_logging_call_args = [ ('Starting a new payday.'), ('Payday started at {}.'.format(ts_start)), - ('Zeroed out the pending column.'), - ('Fetched participants.'), + ('Prepared the DB.'), ] expected_logging_call_args.reverse() for args, _ in log.call_args_list: @@ -525,9 +142,11 @@ def test_start_zero_out_and_get_participants(self, log): log.reset_mock() # run a second time, we should see it pick up the existing payday - second_ts_start = self.payday.start() - self.payday.zero_out_pending(second_ts_start) - second_participants = self.payday.get_participants(second_ts_start) + payday = Payday.start() + second_ts_start = payday.ts_start + with self.db.get_cursor() as cursor: + payday.prepare(cursor, second_ts_start) + second_participants = get_participants(cursor) assert ts_start == second_ts_start participants = list(participants) @@ -540,249 +159,274 @@ def test_start_zero_out_and_get_participants(self, log): expected_logging_call_args = [ ('Picking up with an existing payday.'), ('Payday started at {}.'.format(second_ts_start)), - ('Zeroed out the pending column.'), - ('Fetched participants.')] + ('Prepared the DB.'), + ] expected_logging_call_args.reverse() for args, _ in log.call_args_list: assert args[0] == expected_logging_call_args.pop() - @mock.patch('gittip.billing.payday.log') - def test_end(self, log): - self.payday.start() - self.payday.end() - assert log.called_with('Finished payday.') - - # finishing the payday will set the ts_end date on this payday record - # to now, so this will not return any result + def test_end(self): + Payday.start().end() result = self.db.one("SELECT count(*) FROM paydays " "WHERE ts_end > '1970-01-01'") assert result == 1 + def test_end_raises_NoPayday(self): + with self.assertRaises(NoPayday): + Payday().end() + @mock.patch('gittip.billing.payday.log') - @mock.patch('gittip.billing.payday.Payday.start') @mock.patch('gittip.billing.payday.Payday.payin') @mock.patch('gittip.billing.payday.Payday.end') - def test_payday(self, end, payin, init, log): - ts_start = utcnow() - init.return_value = (ts_start,) + def test_payday(self, end, payin, log): greeting = 'Greetings, program! It\'s PAYDAY!!!!' + Payday.start().run() + log.assert_any_call(greeting) + assert payin.call_count == 1 + assert end.call_count == 1 - self.payday.run() - - assert log.called_with(greeting) - assert init.call_count - assert payin.called_with(init.return_value) - assert end.call_count - - -class TestBillingTransfer(PaydayHarness): - def setUp(self): - PaydayHarness.setUp(self) - self.payday.start() - self.tipper = self.make_participant('lgtest') - def test_transfer(self): - amount = D('1.00') - sender = self.make_participant('test_transfer_sender', pending=0, - balance=1) - recipient = self.make_participant('test_transfer_recipient', pending=0, - balance=1) - - result = self.payday.transfer( sender.username - , recipient.username - , amount - ) - assert result == True - - # no balance remaining for a second transfer - result = self.payday.transfer( sender.username - , recipient.username - , amount - ) - assert result == False - - def test_debit_participant(self): - amount = D('1.00') - subject = self.make_participant('test_debit_participant', pending=0, - balance=1) - - initial_amount = subject.balance +class TestPayin(BalancedHarness): + def create_card_holds(self): + payday = Payday.start() with self.db.get_cursor() as cursor: - self.payday.debit_participant(cursor, subject.username, amount) + payday.prepare(cursor, payday.ts_start) + return payday.create_card_holds(cursor) - subject = Participant.from_username('test_debit_participant') - - expected = initial_amount - amount - actual = subject.balance - assert actual == expected + @mock.patch.object(Payday, 'fetch_card_holds') + @mock.patch('gittip.billing.payday.create_card_hold') + def test_hold_amount_includes_negative_balance(self, cch, fch): + self.db.run(""" + UPDATE participants SET balance = -10 WHERE username='janet' + """) + self.janet.set_tip_to(self.homer, 25) + fch.return_value = {} + cch.return_value = (None, 'some error') + self.create_card_holds() + assert cch.call_args[0][-1] == 35 + + def test_payin_fetches_and_uses_existing_holds(self): + self.janet.set_tip_to(self.homer, 20) + hold, error = create_card_hold(self.db, self.janet, D(20)) + assert hold is not None + assert not error + with mock.patch('gittip.billing.payday.create_card_hold') as cch: + cch.return_value = (None, None) + self.create_card_holds() + assert not cch.called, cch.call_args_list + + @mock.patch.object(Payday, 'fetch_card_holds') + def test_payin_cancels_existing_holds_of_insufficient_amounts(self, fch): + self.janet.set_tip_to(self.homer, 30) + hold, error = create_card_hold(self.db, self.janet, D(10)) + assert not error + fch.return_value = {self.janet.id: hold} + with mock.patch('gittip.billing.payday.create_card_hold') as cch: + fake_hold = object() + cch.return_value = (fake_hold, None) + holds = self.create_card_holds() + assert len(holds) == 1 + assert holds[self.janet.id] is fake_hold + assert hold.voided_at is not None + + @mock.patch('gittip.billing.payday.CardHold') + @mock.patch('gittip.billing.payday.cancel_card_hold') + def test_fetch_card_holds_handles_extra_holds(self, cancel, CardHold): + fake_hold = mock.MagicMock() + fake_hold.meta = {'participant_id': 0} + fake_hold.save = mock.MagicMock() + CardHold.query.filter.return_value = [fake_hold] + for attr, state in (('failure_reason', 'failed'), + ('voided_at', 'cancelled'), + ('debit_href', 'captured')): + holds = Payday.fetch_card_holds(set()) + assert fake_hold.meta['state'] == state + fake_hold.save.assert_called_with() + assert len(holds) == 0 + setattr(fake_hold, attr, None) + holds = Payday.fetch_card_holds(set()) + cancel.assert_called_with(fake_hold) + assert len(holds) == 0 - # this will fail because not enough balance + @mock.patch('gittip.billing.payday.log') + def test_payin_cancels_uncaptured_holds(self, log): + self.janet.set_tip_to(self.homer, 42) + alice = self.make_participant('alice', claimed_time='now', + is_suspicious=False) + self.make_exchange('bill', 50, 0, alice) + alice.set_tip_to(self.janet, 50) + Payday.start().payin() + assert log.call_args_list[-3][0] == ("Captured 0 card holds.",) + assert log.call_args_list[-2][0] == ("Canceled 1 card holds.",) + assert Participant.from_id(alice.id).balance == 0 + assert Participant.from_id(self.janet.id).balance == 8 + assert Participant.from_id(self.homer.id).balance == 42 + + def test_payin_cant_make_balances_more_negative(self): + self.db.run(""" + UPDATE participants SET balance = -10 WHERE username='janet' + """) + payday = Payday.start() with self.db.get_cursor() as cursor: + payday.prepare(cursor, payday.ts_start) + cursor.run(""" + UPDATE payday_participants + SET new_balance = -50 + WHERE username IN ('janet', 'homer') + """) with self.assertRaises(NegativeBalance): - self.payday.debit_participant(cursor, subject.username, amount) - - def test_skim_credit(self): - actual = skim_credit(D('10.00')) - assert actual == (D('10.00'), D('0.00')) - - def test_credit_participant(self): - amount = D('1.00') - subject = self.make_participant('test_credit_participant', pending=0, - balance=1) - - initial_amount = subject.pending - - with self.db.get_cursor() as cursor: - self.payday.credit_participant(cursor, subject.username, amount) - - subject = Participant.from_username('test_credit_participant') # reload - - expected = initial_amount + amount - actual = subject.pending - assert actual == expected - - def test_record_transfer(self): - amount = D('1.00') - subjects = ['jim', 'kate', 'bob'] - - for subject in subjects: - self.make_participant(subject, balance=1, pending=0) - + payday.update_balances(cursor) + + @mock.patch.object(Payday, 'fetch_card_holds') + @mock.patch('balanced.Customer') + def test_card_hold_error(self, Customer, fch): + self.janet.set_tip_to(self.homer, 17) + Customer.side_effect = Foobar + fch.return_value = {} + Payday.start().payin() + payday = self.fetch_payday() + assert payday['ncc_failing'] == 1 + + def test_payin_doesnt_process_tips_when_goal_is_negative(self): + alice = self.make_participant('alice', claimed_time='now', balance=20) + bob = self.make_participant('bob', claimed_time='now') + alice.set_tip_to(bob, 13) + self.db.run("UPDATE participants SET goal = -1 WHERE username='bob'") + payday = Payday.start() with self.db.get_cursor() as cursor: - # Tip 'jim' twice - for recipient in ['jim'] + subjects: - self.payday.record_transfer( cursor - , self.tipper.username - , recipient - , amount - , 'tip' - ) - - for subject in subjects: - # 'jim' is tipped twice - expected = amount * 2 if subject == 'jim' else amount - actual = self.db.one( "SELECT sum(amount) FROM transfers " - "WHERE tippee=%s" - , (subject,) - ) - assert actual == expected - - def test_record_transfer_invalid_participant(self): - amount = D('1.00') - + payday.prepare(cursor, payday.ts_start) + payday.transfer_tips(cursor) + payday.update_balances(cursor) + assert Participant.from_id(alice.id).balance == 20 + assert Participant.from_id(bob.id).balance == 0 + + def test_payin_doesnt_make_null_transfers(self): + alice = self.make_participant('alice', claimed_time='now') + alice.set_tip_to(self.homer, 1) + alice.set_tip_to(self.homer, 0) + a_team = self.make_participant('a_team', claimed_time='now', number='plural') + a_team.add_member(alice) + Payday.start().payin() + transfers0 = self.db.all("SELECT * FROM transfers WHERE amount = 0") + assert not transfers0 + + def test_transfer_tips(self): + alice = self.make_participant('alice', claimed_time='now', balance=1, + last_bill_result='') + alice.set_tip_to(self.janet, D('0.51')) + alice.set_tip_to(self.homer, D('0.50')) + payday = Payday.start() with self.db.get_cursor() as cursor: - with self.assertRaises(IntegrityError): - self.payday.record_transfer( cursor - , 'idontexist' - , 'nori' - , amount - , 'tip' - ) - - def test_record_credit_updates_balance(self): - alice = Participant.from_username('alice') - self.payday.record_credit( amount=D("-1.00") - , fee=D("0.41") - , error="" - , participant=alice - ) - alice = Participant.from_username('alice') - assert alice.balance == D("0.59") - - def test_record_credit_fails_if_negative_balance(self): - alice = Participant.from_username('alice') - pytest.raises( NegativeBalance - , self.payday.record_credit - , amount=D("10.00") - , fee=D("0.41") - , error="" - , participant=alice - ) - - def test_record_credit_doesnt_update_balance_if_error(self): - alice = Participant.from_username('alice') - self.payday.record_credit( amount=D("-1.00") - , fee=D("0.41") - , error="SOME ERROR" - , participant=alice - ) - alice = Participant.from_username('alice') - assert alice.balance == D("0.00") - - -class TestPachinko(Harness): - - def setUp(self): - Harness.setUp(self) - self.payday = Payday(self.db) - - def test_get_participants_gets_participants(self): + payday.prepare(cursor, payday.ts_start) + payday.transfer_tips(cursor) + payday.update_balances(cursor) + alice = Participant.from_id(alice.id) + assert Participant.from_id(alice.id).balance == D('0.49') + assert Participant.from_id(self.janet.id).balance == D('0.51') + assert Participant.from_id(self.homer.id).balance == 0 + + def test_transfer_takes(self): a_team = self.make_participant('a_team', claimed_time='now', number='plural', balance=20) - a_team.add_member(self.make_participant('alice', claimed_time='now')) - a_team.add_member(self.make_participant('bob', claimed_time='now')) - - ts_start = self.payday.start() - - actual = [p.username for p in self.payday.get_participants(ts_start)] - expected = ['a_team', 'alice', 'bob'] - assert actual == expected - - def test_pachinko_pachinkos(self): - a_team = self.make_participant('a_team', claimed_time='now', number='plural', balance=20, \ - pending=0) - a_team.add_member(self.make_participant('alice', claimed_time='now', balance=0, pending=0)) - a_team.add_member(self.make_participant('bob', claimed_time='now', balance=0, pending=0)) - - ts_start = self.payday.start() - - participants = self.payday.genparticipants(ts_start, LOOP_PACHINKO) - self.payday.pachinko(ts_start, participants) - - assert Participant.from_username('alice').pending == D('0.01') - assert Participant.from_username('bob').pending == D('0.01') - - def test_pachinko_sees_current_take(self): - a_team = self.make_participant('a_team', claimed_time='now', number='plural', balance=20, \ - pending=0) - alice = self.make_participant('alice', claimed_time='now', balance=0, pending=0) + alice = self.make_participant('alice', claimed_time='now') a_team.add_member(alice) + a_team.add_member(self.make_participant('bob', claimed_time='now')) a_team.set_take_for(alice, D('1.00'), alice) - ts_start = self.payday.start() - - participants = self.payday.genparticipants(ts_start, LOOP_PACHINKO) - self.payday.pachinko(ts_start, participants) - - assert Participant.from_username('alice').pending == D('1.00') - - def test_pachinko_ignores_take_set_after_payday_starts(self): - a_team = self.make_participant('a_team', claimed_time='now', number='plural', balance=20, \ - pending=0) - alice = self.make_participant('alice', claimed_time='now', balance=0, pending=0) - a_team.add_member(alice) - a_team.set_take_for(alice, D('0.33'), alice) - - ts_start = self.payday.start() - a_team.set_take_for(alice, D('1.00'), alice) - - participants = self.payday.genparticipants(ts_start, LOOP_PACHINKO) - self.payday.pachinko(ts_start, participants) - - assert Participant.from_username('alice').pending == D('0.33') - - def test_pachinko_ignores_take_thats_already_been_processed(self): - a_team = self.make_participant('a_team', claimed_time='now', number='plural', balance=20, \ - pending=0) - alice = self.make_participant('alice', claimed_time='now', balance=0, pending=0) - a_team.add_member(alice) - a_team.set_take_for(alice, D('0.33'), alice) - - ts_start = self.payday.start() - a_team.set_take_for(alice, D('1.00'), alice) - - for i in range(4): - participants = self.payday.genparticipants(ts_start, LOOP_PACHINKO) - self.payday.pachinko(ts_start, participants) + payday = Payday.start() + + # Test that payday ignores takes set after it started + a_team.set_take_for(alice, D('2.00'), alice) + + # Run the transfer multiple times to make sure we ignore takes that + # have already been processed + for i in range(3): + with self.db.get_cursor() as cursor: + payday.prepare(cursor, payday.ts_start) + payday.transfer_takes(cursor, payday.ts_start) + payday.update_balances(cursor) + + participants = self.db.all("SELECT username, balance FROM participants") + + for p in participants: + if p.username == 'a_team': + assert p.balance == D('18.99') + elif p.username == 'alice': + assert p.balance == D('1.00') + elif p.username == 'bob': + assert p.balance == D('0.01') + else: + assert p.balance == 0 + + @mock.patch.object(Payday, 'fetch_card_holds') + def test_transfer_takes_doesnt_make_negative_transfers(self, fch): + hold = balanced.CardHold(amount=1500, meta={'participant_id': self.janet.id}) + hold.capture = lambda *a, **kw: None + hold.save = lambda *a, **kw: None + fch.return_value = {self.janet.id: hold} + self.janet.update_number('plural') + self.janet.set_tip_to(self.homer, 10) + self.janet.add_member(self.david) + Payday.start().payin() + assert Participant.from_id(self.david.id).balance == 0 + assert Participant.from_id(self.homer.id).balance == 10 + assert Participant.from_id(self.janet.id).balance == 0 + + def test_take_over_during_payin(self): + alice = self.make_participant('alice', claimed_time='now', balance=50) + bob = self.make_participant('bob', claimed_time='now', elsewhere='twitter') + alice.set_tip_to(bob, 18) + payday = Payday.start() + with self.db.get_cursor() as cursor: + payday.prepare(cursor, payday.ts_start) + bruce = self.make_participant('bruce', claimed_time='now') + bruce.take_over(('twitter', str(bob.id)), have_confirmation=True) + payday.transfer_tips(cursor) + bruce.delete_elsewhere('twitter', str(bob.id)) + billy = self.make_participant('billy', claimed_time='now') + billy.take_over(('github', str(bruce.id)), have_confirmation=True) + payday.update_balances(cursor) + payday.take_over_balances() + assert Participant.from_id(bob.id).balance == 0 + assert Participant.from_id(bruce.id).balance == 0 + assert Participant.from_id(billy.id).balance == 18 + + @mock.patch.object(Payday, 'fetch_card_holds') + @mock.patch('gittip.billing.payday.capture_card_hold') + def test_payin_dumps_transfers_for_debugging(self, cch, fch): + self.janet.set_tip_to(self.homer, 10) + fake_hold = mock.MagicMock() + fake_hold.amount = 1500 + fch.return_value = {self.janet.id: fake_hold} + cch.side_effect = Foobar + open = mock.MagicMock() + with mock.patch.dict(__builtins__, {'open': open}): + with self.assertRaises(Foobar): + Payday.start().payin() + assert open.call_count == 1 + + +class TestPayout(Harness): + + def test_payout_no_balanced_href(self): + self.make_participant('alice', claimed_time='now', is_suspicious=False, + balance=20) + Payday.start().payout() - assert Participant.from_username('alice').pending == D('0.33') + @mock.patch('gittip.billing.payday.log') + def test_payout_unreviewed(self, log): + self.make_participant('alice', claimed_time='now', is_suspicious=None, + balance=20, balanced_customer_href='foo', + last_ach_result='') + Payday.start().payout() + log.assert_any_call('UNREVIEWED: alice') + + @mock.patch('gittip.billing.payday.ach_credit') + def test_payout_ach_error(self, ach_credit): + self.make_participant('alice', claimed_time='now', is_suspicious=False, + balance=20, balanced_customer_href='foo', + last_ach_result='') + ach_credit.return_value = 'some error' + Payday.start().payout() + payday = self.fetch_payday() + assert payday['nach_failing'] == 1 diff --git a/tests/py/test_charts_json.py b/tests/py/test_charts_json.py index 4b6f1462e9..f423d1d5ba 100644 --- a/tests/py/test_charts_json.py +++ b/tests/py/test_charts_json.py @@ -3,33 +3,33 @@ import datetime import json +from mock import patch + from gittip.billing.payday import Payday from gittip.testing import Harness def today(): return datetime.datetime.utcnow().date().strftime('%Y-%m-%d') -class Tests(Harness): +class TestChartsJson(Harness): def setUp(self): Harness.setUp(self) - self.alice = self.make_participant('alice', balance=10, claimed_time='now') - self.bob = self.make_participant('bob', balance=10, claimed_time='now') + self.alice = self.make_participant('alice', claimed_time='now') + self.bob = self.make_participant('bob', claimed_time='now') self.carl = self.make_participant('carl', claimed_time='now') - self.db.run(""" - INSERT INTO EXCHANGES - (amount, fee, participant) VALUES - (10.00, 0.00, 'alice'), - (10.00, 0.00, 'bob') - """) + self.make_exchange('bill', 10, 0, self.alice) + self.make_exchange('bill', 10, 0, self.bob) self.make_participant('notactive', claimed_time='now') self.alice.set_tip_to(self.carl, '1.00') self.bob.set_tip_to(self.carl, '2.00') def run_payday(self): - Payday(self.db).run() + with patch.object(Payday, 'fetch_card_holds') as fch: + fch.return_value = {} + Payday.start().run() def test_no_payday_returns_empty_list(self): diff --git a/tests/py/test_close.py b/tests/py/test_close.py index 0091c4c51c..908f4591e6 100644 --- a/tests/py/test_close.py +++ b/tests/py/test_close.py @@ -6,6 +6,7 @@ import balanced import pytest from gittip.billing.payday import Payday +from gittip.exceptions import NoBalancedCustomerHref, NotWhitelisted from gittip.models.community import Community from gittip.models.participant import Participant from gittip.testing import Harness @@ -39,7 +40,7 @@ def test_close_page_is_usually_available(self): assert 'Personal Information' in body def test_close_page_is_not_available_during_payday(self): - Payday(self.db).start() + Payday.start() self.make_participant('alice', claimed_time='now') body = self.client.GET('/alice/account/close', auth_as='alice').body assert 'Personal Information' not in body @@ -58,7 +59,7 @@ def test_can_post_to_close_page(self): assert Participant.from_username('bob').balance == 7 def test_cant_post_to_close_page_during_payday(self): - Payday(self.db).start() + Payday.start() self.make_participant('alice', claimed_time='now') body = self.client.POST('/alice/account/close', auth_as='alice').body assert 'Try Again Later' in body @@ -85,19 +86,19 @@ def test_wbtba_withdraws_balance_to_bank_account(self): def test_wbtba_raises_NoBalancedCustomerHref_if_no_balanced_customer_href(self): alice = self.make_participant('alice', balance=D('10.00'), is_suspicious=False) with self.db.get_cursor() as cursor: - with pytest.raises(alice.NoBalancedCustomerHref): + with pytest.raises(NoBalancedCustomerHref): alice.withdraw_balance_to_bank_account(cursor) def test_wbtba_raises_NotWhitelisted_if_not_whitelisted(self): alice = self.make_participant('alice', balance=D('10.00')) with self.db.get_cursor() as cursor: - with pytest.raises(alice.NotWhitelisted): + with pytest.raises(NotWhitelisted): alice.withdraw_balance_to_bank_account(cursor) def test_wbtba_raises_NotWhitelisted_if_blacklisted(self): alice = self.make_participant('alice', balance=D('10.00'), is_suspicious=True) with self.db.get_cursor() as cursor: - with pytest.raises(alice.NotWhitelisted): + with pytest.raises(NotWhitelisted): alice.withdraw_balance_to_bank_account(cursor) @@ -331,12 +332,12 @@ def test_cpi_clears_teams(self): bob = self.make_participant('bob', claimed_time='now') team.add_member(bob) - assert len(team.get_takes()) == 2 # sanity check + assert len(team.get_current_takes()) == 2 # sanity check with self.db.get_cursor() as cursor: alice.clear_personal_information(cursor) - assert len(team.get_takes()) == 1 + assert len(team.get_current_takes()) == 1 # uic = update_is_closed diff --git a/tests/py/test_history.py b/tests/py/test_history.py index 91f386a3d6..f1c5a8b245 100644 --- a/tests/py/test_history.py +++ b/tests/py/test_history.py @@ -2,6 +2,8 @@ from decimal import Decimal +from mock import patch + from gittip.billing.payday import Payday from gittip.models.participant import Participant from gittip.testing import Harness @@ -11,15 +13,15 @@ class TestHistory(Harness): def test_iter_payday_events(self): - Payday(self.db).run() - team = self.make_participant('team', number='plural', claimed_time='now', balance=10000) - alice = self.make_participant('alice', claimed_time='now', balance=5000) + Payday.start().run() + team = self.make_participant('team', number='plural', claimed_time='now') + alice = self.make_participant('alice', claimed_time='now') + self.make_exchange('bill', 10000, 0, team) + self.make_exchange('bill', 10000, 0, alice) + self.make_exchange('bill', -5000, 0, alice) self.db.run(""" - INSERT INTO exchanges - (amount, fee, participant, timestamp) - VALUES (10000, 0, 'team', now() - interval '1 month') - , (10000, 0, 'alice', now() - interval '1 month') - , (-5000, 0, 'alice', now() - interval '1 month'); + UPDATE transfers + SET timestamp = "timestamp" - interval '1 month' """) bob = self.make_participant('bob', claimed_time='now') carl = self.make_participant('carl', claimed_time='now') @@ -29,7 +31,9 @@ def test_iter_payday_events(self): assert bob.balance == 0 for i in range(2): - Payday(self.db).run() + with patch.object(Payday, 'fetch_card_holds') as fch: + fch.return_value = {} + Payday.start().run() self.db.run(""" UPDATE paydays SET ts_start = ts_start - interval '1 week' @@ -40,7 +44,7 @@ def test_iter_payday_events(self): bob = Participant.from_id(bob.id) assert bob.balance == 12 - Payday(self.db).start() + Payday().start() events = list(iter_payday_events(self.db, bob)) assert len(events) == 8 assert events[0]['kind'] == 'day-open' @@ -58,3 +62,21 @@ def test_iter_payday_events(self): assert carl.balance == 0 events = list(iter_payday_events(self.db, carl)) assert len(events) == 0 + + def test_iter_payday_events_with_failed_exchanges(self): + alice = self.make_participant('alice', claimed_time='now') + self.make_exchange('bill', 50, 0, alice) + self.make_exchange('bill', 12, 0, alice, status='failed') + self.make_exchange('ach', -40, 0, alice, status='failed') + events = list(iter_payday_events(self.db, alice)) + assert len(events) == 5 + assert events[0]['kind'] == 'day-open' + assert events[0]['balance'] == 50 + assert events[1]['kind'] == 'credit' + assert events[1]['balance'] == 50 + assert events[2]['kind'] == 'charge' + assert events[2]['balance'] == 50 + assert events[3]['kind'] == 'charge' + assert events[3]['balance'] == 50 + assert events[4]['kind'] == 'day-close' + assert events[4]['balance'] == '0.00' diff --git a/tests/py/test_paydays_json.py b/tests/py/test_paydays_json.py index a5f82b4969..d27663c8f2 100644 --- a/tests/py/test_paydays_json.py +++ b/tests/py/test_paydays_json.py @@ -9,7 +9,7 @@ class Tests(Harness): def test_paydays_json_gives_paydays(self): - Payday(self.db).start() + Payday.start() self.make_participant("alice") response = self.client.GET("/about/paydays.json") diff --git a/tests/py/test_stats.py b/tests/py/test_stats.py index 8a1651d67c..a0b0a92453 100644 --- a/tests/py/test_stats.py +++ b/tests/py/test_stats.py @@ -117,8 +117,7 @@ def test_stats_description_accurate_during_payday_run(self, utcnow): env = wireup.env() wireup.billing(env) - payday = Payday(self.db) - payday.start() + payday = Payday.start() body = self.get_stats_page() assert "is changing hands right now!" in body, body @@ -133,8 +132,7 @@ def test_stats_description_accurate_outside_of_payday(self, utcnow): self.client.hydrate_website() - payday = Payday(self.db) - payday.start() + payday = Payday.start() body = self.get_stats_page() assert "is ready for this Thursday" in body, body diff --git a/tests/py/test_teams.py b/tests/py/test_teams.py index 4b97b08e12..39c275db40 100644 --- a/tests/py/test_teams.py +++ b/tests/py/test_teams.py @@ -88,6 +88,6 @@ def test_remove_all_members(self): bob = self.make_participant('bob', claimed_time='now') self.team.add_member(bob) - assert len(self.team.get_takes()) == 2 # sanity check + assert len(self.team.get_current_takes()) == 2 # sanity check self.team.remove_all_members() - assert len(self.team.get_takes()) == 0 + assert len(self.team.get_current_takes()) == 0 diff --git a/vendor/balanced-1.0.1beta2.tar.gz b/vendor/balanced-1.0.1beta2.tar.gz deleted file mode 100644 index f8239be72f..0000000000 Binary files a/vendor/balanced-1.0.1beta2.tar.gz and /dev/null differ diff --git a/vendor/balanced-1.1.1.tar.gz b/vendor/balanced-1.1.1.tar.gz new file mode 100644 index 0000000000..a1a875f03b Binary files /dev/null and b/vendor/balanced-1.1.1.tar.gz differ diff --git a/www/%username/history/index.html.spt b/www/%username/history/index.html.spt index 0b395aa24c..024bb8ea38 100644 --- a/www/%username/history/index.html.spt +++ b/www/%username/history/index.html.spt @@ -75,14 +75,16 @@ admin_override = user.ADMIN and (participant != user.participant or 'override' i {{ -event['amount'] + event['fee'] }} {{ event['balance'] }} + {% if event['recorder'] == None %} - automatic withdrawal + automatic withdrawal + {% if event['status'] %}— status: {{ event['status'] }}{% endif %} + {% if event['note'] %}— error: “{{ event['note']|e }}”{% endif %} {% else %} - “{{ event['note']|e }}”—{{ event['recorder'] }} - {% endif %} + {% elif event['kind'] == 'charge' %} @@ -93,11 +95,17 @@ admin_override = user.ADMIN and (participant != user.participant or 'override' i {{ event['balance'] }} - {% if event['recorder'] == None %}automatic charge{% else %} + {% if event['recorder'] == None %} + automatic charge + {% else %} “{{ event['note']|e }}”—{{ event['recorder'] }} - {% endif %} + {% endif %} + {% if event['status'] in (None, 'suceeded') %} (receipt) + {% elif event['status'] in ('pending', 'failed') %} + ({{ event['status'] }}{% if event['note'] %}: “{{ event['note']|e }}”{% endif %}) + {% endif %} {% elif event['kind'] == 'transfer' %} diff --git a/www/%username/tips.json.spt b/www/%username/tips.json.spt index 9e1935b748..789949f727 100644 --- a/www/%username/tips.json.spt +++ b/www/%username/tips.json.spt @@ -29,7 +29,7 @@ if POST: out.append(one) if qs.get('also_prune', 'false').lower() in ('true', '1', 'yes'): - old_tips, __ignored = participant.get_tips_and_total() + old_tips = participant.get_current_tips() for tip in old_tips: if tip['tippee'] not in seen: participant.set_tip_to(tip['tippee'], '0.00')