diff --git a/setup.py b/setup.py index 533d8ee..249f7f3 100644 --- a/setup.py +++ b/setup.py @@ -10,9 +10,9 @@ classifiers=['Programming Language :: Python :: 3 :: Only'], py_modules=['tap_braintree'], install_requires=[ - 'singer-python==5.5.0', + 'singer-python==5.12.2', 'requests==2.20.0', - 'braintree==3.53.0', + 'braintree==4.16.0', ], extras_require={ 'dev': [ @@ -27,9 +27,7 @@ ''', packages=['tap_braintree'], package_data = { - 'tap_braintree/schemas': [ - 'transactions.json', - ], + "schemas": ["tap_braintree/schemas/*.json", "tap_braintree/schemas/shared/*.json"], }, include_package_data=True, ) diff --git a/tap_braintree/__init__.py b/tap_braintree/__init__.py index 53b65c3..5f8da2b 100644 --- a/tap_braintree/__init__.py +++ b/tap_braintree/__init__.py @@ -1,235 +1,75 @@ #!/usr/bin/env python3 - -from datetime import datetime, timedelta -import os -import pytz - - +import sys +import json +import datetime import braintree import singer - from singer import utils -from .transform import transform_row - - -CONFIG = {} -STATE = {} -TRAILING_DAYS = timedelta(days=30) -DEFAULT_TIMESTAMP = "1970-01-01T00:00:00Z" - -logger = singer.get_logger() - - -def get_abs_path(path): - return os.path.join(os.path.dirname(os.path.realpath(__file__)), path) +from tap_braintree.discover import discover +from tap_braintree.sync import sync as _sync +REQUIRED_CONFIG_KEYS = [ + "merchant_id", + "public_key", + "private_key", + "start_date" +] -def load_schema(entity): - return utils.load_json(get_abs_path("schemas/{}.json".format(entity))) +LOGGER = singer.get_logger() - -def get_start(entity): - if entity not in STATE: - STATE[entity] = CONFIG["start_date"] - - return STATE[entity] - - -def to_utc(dt): - return dt.replace(tzinfo=pytz.UTC) - - -def daterange(start_date, end_date): +def do_discover(): """ - Generator function that produces an iterable list of days between the two - dates start_date and end_date as a tuple pair of datetimes. - - Note: - All times are set to 0:00. Designed to be used in date query where query - logic would be record_date >= 2019-01-01 0:00 and record_date < 2019-01-02 0:00 - - Args: - start_date (datetime): start of period - end_date (datetime): end of period - - Yields: - tuple: daily period - * datetime: day within range - * datetime: day within range + 1 day - + Run discovery mode """ - # set to start of day - start_date = to_utc( - datetime.combine( - start_date.date(), - datetime.min.time() # set to the 0:00 on the day of the start date - ) - ) - - end_date = to_utc(end_date + timedelta(1)) - - for n in range(int((end_date - start_date).days)): - yield start_date + timedelta(n), start_date + timedelta(n + 1) - - -def sync_transactions(): - schema = load_schema("transactions") - - singer.write_schema("transactions", schema, ["id"], - bookmark_properties=['created_at']) - - latest_updated_at = utils.strptime_to_utc(STATE.get('latest_updated_at', DEFAULT_TIMESTAMP)) - - run_maximum_updated_at = latest_updated_at - - latest_disbursement_date = utils.strptime_to_utc(STATE.get('latest_disbursment_date', DEFAULT_TIMESTAMP)) - - run_maximum_disbursement_date = latest_disbursement_date - - latest_start_date = utils.strptime_to_utc(get_start("transactions")) - - period_start = latest_start_date - TRAILING_DAYS - - period_end = utils.now() - - logger.info("transactions: Syncing from {}".format(period_start)) - - logger.info("transactions: latest_updated_at from {}, disbursement_date from {}".format( - latest_updated_at, latest_disbursement_date - )) - - logger.info("transactions: latest_start_date from {}".format( - latest_start_date - )) + LOGGER.info("Starting discovery") + catalog = discover() + json.dump(catalog.to_dict(), sys.stdout, indent=2) + LOGGER.info("Finished discover") - # increment through each day (20k results max from api) - for start, end in daterange(period_start, period_end): - - end = min(end, period_end) - - data = braintree.Transaction.search( - braintree.TransactionSearch.created_at.between(start, end)) - time_extracted = utils.now() - - logger.info("transactions: Fetched {} records from {} - {}".format( - data.maximum_size, start, end - )) - - row_written_count = 0 - row_skipped_count = 0 - - for row in data: - # Ensure updated_at consistency - if not getattr(row, 'updated_at'): - row.updated_at = row.created_at - - transformed = transform_row(row, schema) - updated_at = to_utc(row.updated_at) - - # if disbursement is successful, get disbursement date - # set disbursement datetime to min if not found - - if row.disbursement_details is None: - disbursement_date = datetime.min - - else: - if row.disbursement_details.disbursement_date is None: - row.disbursement_details.disbursement_date = datetime.min - - disbursement_date = to_utc(datetime.combine( - row.disbursement_details.disbursement_date, - datetime.min.time())) - - # Is this more recent than our past stored value of update_at? - # Is this more recent than our past stored value of disbursement_date? - # Use >= for updated_at due to non monotonic updated_at values - # Use > for disbursement_date - confirming all transactions disbursed - # at the same time - # Update our high water mark for updated_at and disbursement_date - # in this run - if ( - updated_at >= latest_updated_at - ) or ( - disbursement_date >= latest_disbursement_date - ): - - if updated_at > run_maximum_updated_at: - run_maximum_updated_at = updated_at - - if disbursement_date > run_maximum_disbursement_date: - run_maximum_disbursement_date = disbursement_date - - singer.write_record("transactions", transformed, - time_extracted=time_extracted) - row_written_count += 1 - - else: - - row_skipped_count += 1 - - logger.info("transactions: Written {} records from {} - {}".format( - row_written_count, start, end - )) - - logger.info("transactions: Skipped {} records from {} - {}".format( - row_skipped_count, start, end - )) - - # End day loop - logger.info("transactions: Complete. Last updated record: {}".format( - run_maximum_updated_at - )) - - logger.info("transactions: Complete. Last disbursement date: {}".format( - run_maximum_disbursement_date - )) - - latest_updated_at = run_maximum_updated_at - - latest_disbursement_date = run_maximum_disbursement_date - - STATE['latest_updated_at'] = utils.strftime(latest_updated_at) - - STATE['latest_disbursement_date'] = utils.strftime( - latest_disbursement_date) - - utils.update_state(STATE, "transactions", utils.strftime(end)) - - singer.write_state(STATE) - - -def do_sync(): - logger.info("Starting sync") - sync_transactions() - logger.info("Sync completed") - - -@utils.handle_top_exception(logger) +@utils.handle_top_exception(LOGGER) def main(): - args = utils.parse_args( - ["merchant_id", "public_key", "private_key", "start_date"] + parsed_args = singer.utils.parse_args(REQUIRED_CONFIG_KEYS) + config = {} + state = {} + + if parsed_args.config: + config = parsed_args.config + + if parsed_args.state: + state = parsed_args.state + + environment = getattr(braintree.Environment, config.pop("environment", "Production")) + + gateway = braintree.BraintreeGateway( + braintree.Configuration( + environment, + merchant_id = config['merchant_id'], + public_key= config["public_key"], + private_key=config["private_key"] + ) ) - config = args.config - environment = getattr( - braintree.Environment, config.pop("environment", "Production") + # This is added for credentials verification. If credentials are invalid then it will raise Authentication Error + gateway.customer.search( + braintree.CustomerSearch.created_at.between( + datetime.datetime(2022, 6, 29), + datetime.datetime(2011, 6, 30) + ) ) - CONFIG['start_date'] = config.pop('start_date') - - braintree.Configuration.configure(environment, **config) - - if args.state: - STATE.update(args.state) - try: - do_sync() + if parsed_args.discover: + do_discover() + else: + _sync( + gateway, + config, + parsed_args.catalog or discover(), + state + ) except braintree.exceptions.authentication_error.AuthenticationError: - logger.critical('Authentication error occured. ' - 'Please check your merchant_id, public_key, and ' - 'private_key for errors', exc_info=True) - + LOGGER.critical('Authentication error occured. Please check your merchant_id, public_key, and private_key for errors', exc_info=True) if __name__ == '__main__': main() diff --git a/tap_braintree/discover.py b/tap_braintree/discover.py new file mode 100644 index 0000000..519e5fa --- /dev/null +++ b/tap_braintree/discover.py @@ -0,0 +1,30 @@ +import singer +from tap_braintree.streams import STREAMS +from tap_braintree.schema import get_schemas, load_shared_schema_refs +LOGGER = singer.get_logger() + +def discover(): + """ + Run the discover mode, prepare the catalog file and return the catalog + """ + + schemas, field_metadata = get_schemas() + streams=[] + + for stream_name, schema_dict in schemas.items(): + mdata = field_metadata[stream_name] + + # Loading referred schemas + refs = load_shared_schema_refs() + + catalog_entry = { + "stream": stream_name, + "tap_stream_id": stream_name, + "key_properties": STREAMS[stream_name].key_properties, + "schema": singer.resolve_schema_references(schema_dict, refs), + "metadata": mdata + } + + streams.append(catalog_entry) + + return {'streams': streams} diff --git a/tap_braintree/schema.py b/tap_braintree/schema.py new file mode 100644 index 0000000..88665d1 --- /dev/null +++ b/tap_braintree/schema.py @@ -0,0 +1,69 @@ +import os +import json +from singer import metadata +from tap_braintree.streams import STREAMS + +def get_abs_path(path): + """ + Return full path for the specified file + """ + + return os.path.join(os.path.dirname(os.path.realpath(__file__)), path) + +def load_shared_schema_refs(): + """ + Fetch and return dictionary of schemas for references + """ + + shared_schemas_path = get_abs_path('schemas') + + shared_file_names = ["shared/" + f for f in os.listdir(get_abs_path('schemas/shared'))] + + shared_schemas = ["add_ons.json", "discounts.json"] + + shared_schemas.extend(shared_file_names) + + shared_schema_refs = {} + for shared_file in shared_schemas: + with open(os.path.join(shared_schemas_path, shared_file)) as data_file: + shared_schema_refs['/' + shared_file] = json.load(data_file) + + return shared_schema_refs + +def get_schemas(): + """ + Fetch and return metadata and schema for all the streams + """ + + schemas = {} + field_metadata = {} + + for stream_name, stream_metadata in STREAMS.items(): + + schema_path = get_abs_path("schemas/{}.json".format(stream_name)) + with open(schema_path,"r") as file: + schema = json.load(file) + schemas[stream_name] = schema + + mdata = metadata.new() + + mdata = metadata.get_standard_metadata( + schema=schema, + key_properties=stream_metadata.key_properties, + valid_replication_keys=stream_metadata.replication_keys, + replication_method=stream_metadata.replication_method, + ) + + mdata = metadata.to_map(mdata) + # Loop through all keys and make replication keys of automatic inclusion + for field_name in schema["properties"].keys(): + + if stream_metadata.replication_keys and field_name in stream_metadata.replication_keys: + mdata = metadata.write( + mdata, ("properties", field_name), "inclusion", "automatic", + ) + + mdata = metadata.to_list(mdata) + field_metadata[stream_name] = mdata + + return schemas, field_metadata diff --git a/tap_braintree/schemas/add_ons.json b/tap_braintree/schemas/add_ons.json new file mode 100644 index 0000000..557b09d --- /dev/null +++ b/tap_braintree/schemas/add_ons.json @@ -0,0 +1,76 @@ +{ + "type": [ + "null", + "object" + ], + "properties": { + "amount": { + "type": [ + "null", + "number" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "quantity": { + "type": [ + "null", + "integer" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } +} \ No newline at end of file diff --git a/tap_braintree/schemas/customers.json b/tap_braintree/schemas/customers.json new file mode 100644 index 0000000..e03ad36 --- /dev/null +++ b/tap_braintree/schemas/customers.json @@ -0,0 +1,21837 @@ +{ + "type": [ + "null", + "object" + ], + "properties": { + "id": { + "type": [ + "null", + "string" + ] + }, + "address": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "customer_id": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + } + }, + "android_pay_cards": { + "type": [ + "null", + "array" + ], + "items": { + "$ref": "/shared/cards.json", + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "customer_id": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "default": { + "type": [ + "null", + "boolean" + ] + }, + "google_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "is_network_tokenized": { + "type": [ + "null", + "boolean" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "source_card_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "subscriptions": { + "type": [ + "null", + "array" + ], + "items": { + "addOns": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "amount": { + "type": [ + "null", + "number" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "quantity": { + "type": [ + "null", + "integer" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + } + }, + "balance": { + "type": [ + "null", + "number" + ] + }, + "billing_day_of_month": { + "type": [ + "null", + "integer" + ] + }, + "billing_period_end_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "billing_period_start_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "days_past_due": { + "type": [ + "null", + "integer" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "descriptor": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "discounts": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "amount": { + "type": [ + "null", + "number" + ] + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "quantity": { + "type": [ + "null", + "integer" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + } + }, + "failure_count": { + "type": [ + "null", + "integer" + ] + }, + "first_billing_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "merchant_account_id": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "next_bill_amount": { + "type": [ + "null", + "number" + ] + }, + "next_billing_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "next_billing_period_amount": { + "type": [ + "null", + "number" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "paid_through_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "payment_method_token": { + "type": [ + "null", + "string" + ] + }, + "plan_id": { + "type": [ + "null", + "string" + ] + }, + "price": { + "type": [ + "null", + "number" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "status_history": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "string" + ], + "properties": { + "balance": { + "type": [ + "null", + "string" + ] + }, + "price": { + "type": [ + "null", + "string" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "subscription_source": { + "type": [ + "null", + "string" + ] + } + } + } + }, + "transactions": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "acquirer_reference_number": { + "type": [ + "null", + "string" + ] + }, + "additional_processor_response": { + "type": [ + "null", + "string" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "android_pay_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "google_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "is_network_tokenized": { + "type": [ + "null", + "boolean" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "source_card_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_type": { + "type": [ + "null", + "string" + ] + } + } + }, + "apple_pay_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_name": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "authorization_adjustments": { + "type": [ + "null", + "string" + ] + }, + "authorization_expires_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "avs_error_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_postal_code_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_street_address_response_code": { + "type": [ + "null", + "string" + ] + }, + "billing_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha_2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha_3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "channel": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "credit_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "payment_reader_attributes": { + "type": [ + "null", + "object" + ], + "properties": { + "application_cryptogram": { + "type": [ + "null", + "string" + ] + }, + "application_identifier": { + "type": [ + "null", + "string" + ] + }, + "application_interchange_profile": { + "type": [ + "null", + "string" + ] + }, + "application_name": { + "type": [ + "null", + "string" + ] + }, + "application_transaction_counter": { + "type": [ + "null", + "string" + ] + }, + "application_usage_control": { + "type": [ + "null", + "string" + ] + }, + "authorization_mode": { + "type": [ + "null", + "string" + ] + }, + "authorization_response_code": { + "type": [ + "null", + "string" + ] + }, + "card_entry_method": { + "type": [ + "null", + "string" + ] + }, + "card_sequence_number": { + "type": [ + "null", + "string" + ] + }, + "cardholder_verification_method_results": { + "type": [ + "null", + "string" + ] + }, + "cashback_amount": { + "type": [ + "null", + "string" + ] + }, + "cryptogram_information_data": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_default": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_denial": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_online": { + "type": [ + "null", + "string" + ] + }, + "issuer_authentication_data": { + "type": [ + "null", + "string" + ] + }, + "terminal_country_code": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "terminal_transaction_type": { + "type": [ + "null", + "string" + ] + }, + "terminal_verification_result": { + "type": [ + "null", + "string" + ] + }, + "unpredictable_number": { + "type": [ + "null", + "string" + ] + } + } + }, + "unique_number_identifier": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "custom_fields": { + "type": [ + "null", + "string" + ] + }, + "customer_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "fax": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "website": { + "type": [ + "null", + "string" + ] + } + } + }, + "cvv_response_code": { + "type": [ + "null", + "string" + ] + }, + "descriptor": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "disbursement_details": { + "type": [ + "null", + "object" + ], + "properties": { + "disbursement_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "funds_held": { + "type": [ + "null", + "boolean" + ] + }, + "settlement_amount": { + "type": [ + "null", + "number" + ] + }, + "settlement_base_currency_exchange_rate": { + "type": [ + "null", + "string" + ] + }, + "settlement_currency_exchange_rate": { + "type": [ + "null", + "string" + ] + }, + "settlement_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "success": { + "type": [ + "null", + "string" + ] + } + } + }, + "discount_amount": { + "type": [ + "null", + "number" + ] + }, + "escrow_status": { + "type": [ + "null", + "string" + ] + }, + "facilated_details": { + "type": [ + "null", + "object" + ], + "properties": { + "merchant_id": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "payment_method_nonce": { + "type": [ + "null", + "string" + ] + } + } + }, + "facilitator_details": { + "type": [ + "null", + "object" + ], + "properties": { + "oauth_application_client_id": { + "type": [ + "null", + "string" + ] + }, + "oauth_application_name": { + "type": [ + "null", + "string" + ] + }, + "source_payment_method_token": { + "type": [ + "null", + "string" + ] + } + } + }, + "gateway_rejection_reason": { + "type": [ + "null", + "string" + ] + }, + "graphql_id": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "masterpass_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_account_id": { + "type": [ + "null", + "string" + ] + }, + "merchant_address": { + "type": [ + "null", + "object" + ], + "properties": { + "locality": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_identification_number": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "network_response_code": { + "type": [ + "null", + "string" + ] + }, + "network_response_text": { + "type": [ + "null", + "string" + ] + }, + "network_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "order_id": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_type": { + "type": [ + "null", + "string" + ] + }, + "payment_receipt": { + "type": [ + "null", + "object" + ], + "properties": { + "account_balance": { + "type": [ + "null", + "number" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "card_last_4": { + "type": [ + "null", + "string" + ] + }, + "card_present_data": { + "type": [ + "null", + "object" + ], + "properties": { + "application_cryptogram": { + "type": [ + "null", + "string" + ] + }, + "application_identifier": { + "type": [ + "null", + "string" + ] + }, + "application_interchange_profile": { + "type": [ + "null", + "string" + ] + }, + "application_name": { + "type": [ + "null", + "string" + ] + }, + "application_transaction_counter": { + "type": [ + "null", + "string" + ] + }, + "application_usage_control": { + "type": [ + "null", + "string" + ] + }, + "authorization_mode": { + "type": [ + "null", + "string" + ] + }, + "authorization_response_code": { + "type": [ + "null", + "string" + ] + }, + "card_entry_method": { + "type": [ + "null", + "string" + ] + }, + "card_sequence_number": { + "type": [ + "null", + "string" + ] + }, + "cardholder_verification_method_results": { + "type": [ + "null", + "string" + ] + }, + "cashback_amount": { + "type": [ + "null", + "string" + ] + }, + "cryptogram_information_data": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_default": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_denial": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_online": { + "type": [ + "null", + "string" + ] + }, + "issuer_authentication_data": { + "type": [ + "null", + "string" + ] + }, + "terminal_country_code": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_date": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_type": { + "type": [ + "null", + "string" + ] + }, + "termination_verification_result": { + "type": [ + "null", + "string" + ] + }, + "unpredictable_number": { + "type": [ + "null", + "string" + ] + } + } + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "global_id": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "merchant_address": { + "type": [ + "null", + "object" + ], + "properties": { + "locality": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_identification_number": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "pin_verified": { + "type": [ + "null", + "boolean" + ] + }, + "processor_authorization_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_text": { + "type": [ + "null", + "string" + ] + }, + "terminal_identification_number": { + "type": [ + "null", + "string" + ] + }, + "type": { + "type": [ + "null", + "string" + ] + } + } + }, + "paypal_details": { + "type": [ + "null", + "object" + ], + "properties": { + "authorization_id": { + "type": [ + "null", + "string" + ] + }, + "capture_id": { + "type": [ + "null", + "string" + ] + }, + "custom_field": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "implicitly_vaulted_payment_method_global_id": { + "type": [ + "null", + "string" + ] + }, + "implicitly_vaulted_payment_method_token": { + "type": [ + "null", + "string" + ] + }, + "payer_email": { + "type": [ + "null", + "string" + ] + }, + "payer_first_name": { + "type": [ + "null", + "string" + ] + }, + "payer_id": { + "type": [ + "null", + "string" + ] + }, + "payer_last_name": { + "type": [ + "null", + "string" + ] + }, + "payer_phone": { + "type": [ + "null", + "string" + ] + }, + "payer_status": { + "type": [ + "null", + "string" + ] + }, + "payment_id": { + "type": [ + "null", + "string" + ] + }, + "refund_description": { + "type": [ + "null", + "string" + ] + }, + "refund_from_transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "refund_from_transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "refund_id": { + "type": [ + "null", + "string" + ] + }, + "refund_reason": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_currency_code": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_discount_amount": { + "type": [ + "null", + "string" + ] + }, + "select_financing_discount_percentage": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_monthly_payment_amount": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_term": { + "type": [ + "null", + "string" + ] + }, + "seller_protection_status": { + "type": [ + "null", + "string" + ] + }, + "shipping_option_id": { + "type": [ + "null", + "string" + ] + }, + "tax_id": { + "type": [ + "null", + "string" + ] + }, + "tax_id_type": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + } + } + }, + "paypal_here_details": { + "type": [ + "null", + "object" + ], + "properties": { + "authorization_id": { + "type": [ + "null", + "string" + ] + }, + "capture_id": { + "type": [ + "null", + "string" + ] + }, + "invoice_id": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_id": { + "type": [ + "null", + "string" + ] + }, + "payment_type": { + "type": [ + "null", + "string" + ] + }, + "refund_id": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "transaction_initiation_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "transaction_updated_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "pin_verified": { + "type": [ + "null", + "boolean" + ] + }, + "plan_id": { + "type": [ + "null", + "string" + ] + }, + "processor_authorization_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_text": { + "type": [ + "null", + "string" + ] + }, + "processor_response_type": { + "type": [ + "null", + "string" + ] + }, + "processor_settlement_response_text": { + "type": [ + "null", + "string" + ] + }, + "purchase_order_number": { + "type": [ + "null", + "string" + ] + }, + "recurring": { + "type": [ + "null", + "boolean" + ] + }, + "refund_ids": { + "type": [ + "null", + "string" + ] + }, + "refunded_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "response_emv_data": { + "type": [ + "null", + "string" + ] + }, + "retrieval_reference_number": { + "type": [ + "null", + "string" + ] + }, + "risk_data": { + "type": [ + "null", + "object" + ], + "properties": { + "decision": { + "type": [ + "null", + "string" + ] + }, + "decision_reasons": { + "type": [ + "null", + "string" + ] + }, + "device_data_captured": { + "type": [ + "null", + "boolean" + ] + }, + "fraud_service_provider": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "transaction_risk_score": { + "type": [ + "null", + "string" + ] + } + } + }, + "samsung_pay_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "sca_exemption_requested": { + "type": [ + "null", + "string" + ] + }, + "service_fee_amount": { + "type": [ + "null", + "number" + ] + }, + "settlement_batch_id": { + "type": [ + "null", + "string" + ] + }, + "shipping_amount": { + "type": [ + "null", + "number" + ] + }, + "shipping_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "ships_from_postal_code": { + "type": [ + "null", + "string" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "subscription_details": { + "type": [ + "null", + "object" + ], + "properties": { + "billing_period_end_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "billing_period_start_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "subscription_id": { + "type": [ + "null", + "string" + ] + }, + "tax_amount": { + "type": [ + "null", + "number" + ] + }, + "tax_exempt": { + "type": [ + "null", + "boolean" + ] + }, + "terminal_identification_number": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_info": { + "type": [ + "null", + "object" + ], + "properties": { + "cavv": { + "type": [ + "null", + "string" + ] + }, + "ds_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "eci_flag": { + "type": [ + "null", + "string" + ] + }, + "enrolled": { + "type": [ + "null", + "string" + ] + }, + "liability_shift_possible": { + "type": [ + "null", + "boolean" + ] + }, + "liability_shifted": { + "type": [ + "null", + "boolean" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_version": { + "type": [ + "null", + "string" + ] + }, + "xid": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": { + "type": [ + "null", + "string" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "venmo_account_details": { + "type": [ + "null", + "object" + ], + "properties": { + "image_url": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "username": { + "type": [ + "null", + "string" + ] + }, + "venmo_user_id": { + "type": [ + "null", + "string" + ] + } + } + }, + "visa_checkout_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "call_id": { + "type": [ + "null", + "string" + ] + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "voice_referral_number": { + "type": [ + "null", + "integer" + ] + } + } + } + }, + "trial_duration": { + "type": [ + "null", + "integer" + ] + }, + "trial_duration_unit": { + "type": [ + "null", + "string" + ] + }, + "trial_period": { + "type": [ + "null", + "boolean" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "virtual_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_type": { + "type": [ + "null", + "string" + ] + } + } + }, + "apple_pay_cards": { + "type": [ + "null", + "array" + ], + "items": { + "$ref": "/shared/cards.json", + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "customer_id": { + "type": [ + "null", + "string" + ] + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "card_holder_name": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "default": { + "type": [ + "null", + "boolean" + ] + }, + "expired": { + "type": [ + "null", + "boolean" + ] + }, + "is_network_tokenized": { + "type": [ + "null", + "boolean" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "source_card_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "subscriptions": { + "type": [ + "null", + "array" + ], + "items": { + "addOns": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "amount": { + "type": [ + "null", + "number" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "quantity": { + "type": [ + "null", + "integer" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + } + }, + "balance": { + "type": [ + "null", + "number" + ] + }, + "billing_day_of_month": { + "type": [ + "null", + "integer" + ] + }, + "billing_period_end_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "billing_period_start_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "days_past_due": { + "type": [ + "null", + "integer" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "descriptor": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "discounts": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "amount": { + "type": [ + "null", + "number" + ] + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "quantity": { + "type": [ + "null", + "integer" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + } + }, + "failure_count": { + "type": [ + "null", + "integer" + ] + }, + "first_billing_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "merchant_account_id": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "next_bill_amount": { + "type": [ + "null", + "number" + ] + }, + "next_billing_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "next_billing_period_amount": { + "type": [ + "null", + "number" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "paid_through_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "payment_method_token": { + "type": [ + "null", + "string" + ] + }, + "plan_id": { + "type": [ + "null", + "string" + ] + }, + "price": { + "type": [ + "null", + "number" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "status_history": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "string" + ], + "properties": { + "balance": { + "type": [ + "null", + "string" + ] + }, + "price": { + "type": [ + "null", + "string" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "subscription_source": { + "type": [ + "null", + "string" + ] + } + } + } + }, + "transactions": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "acquirer_reference_number": { + "type": [ + "null", + "string" + ] + }, + "additional_processor_response": { + "type": [ + "null", + "string" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "android_pay_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "google_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "is_network_tokenized": { + "type": [ + "null", + "boolean" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "source_card_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_type": { + "type": [ + "null", + "string" + ] + } + } + }, + "apple_pay_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_name": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "authorization_adjustments": { + "type": [ + "null", + "string" + ] + }, + "authorization_expires_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "avs_error_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_postal_code_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_street_address_response_code": { + "type": [ + "null", + "string" + ] + }, + "billing_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha_2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha_3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "channel": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "credit_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "payment_reader_attributes": { + "type": [ + "null", + "object" + ], + "properties": { + "application_cryptogram": { + "type": [ + "null", + "string" + ] + }, + "application_identifier": { + "type": [ + "null", + "string" + ] + }, + "application_interchange_profile": { + "type": [ + "null", + "string" + ] + }, + "application_name": { + "type": [ + "null", + "string" + ] + }, + "application_transaction_counter": { + "type": [ + "null", + "string" + ] + }, + "application_usage_control": { + "type": [ + "null", + "string" + ] + }, + "authorization_mode": { + "type": [ + "null", + "string" + ] + }, + "authorization_response_code": { + "type": [ + "null", + "string" + ] + }, + "card_entry_method": { + "type": [ + "null", + "string" + ] + }, + "card_sequence_number": { + "type": [ + "null", + "string" + ] + }, + "cardholder_verification_method_results": { + "type": [ + "null", + "string" + ] + }, + "cashback_amount": { + "type": [ + "null", + "string" + ] + }, + "cryptogram_information_data": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_default": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_denial": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_online": { + "type": [ + "null", + "string" + ] + }, + "issuer_authentication_data": { + "type": [ + "null", + "string" + ] + }, + "terminal_country_code": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "terminal_transaction_type": { + "type": [ + "null", + "string" + ] + }, + "terminal_verification_result": { + "type": [ + "null", + "string" + ] + }, + "unpredictable_number": { + "type": [ + "null", + "string" + ] + } + } + }, + "unique_number_identifier": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "custom_fields": { + "type": [ + "null", + "string" + ] + }, + "customer_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "fax": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "website": { + "type": [ + "null", + "string" + ] + } + } + }, + "cvv_response_code": { + "type": [ + "null", + "string" + ] + }, + "descriptor": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "disbursement_details": { + "type": [ + "null", + "object" + ], + "properties": { + "disbursement_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "funds_held": { + "type": [ + "null", + "boolean" + ] + }, + "settlement_amount": { + "type": [ + "null", + "number" + ] + }, + "settlement_base_currency_exchange_rate": { + "type": [ + "null", + "string" + ] + }, + "settlement_currency_exchange_rate": { + "type": [ + "null", + "string" + ] + }, + "settlement_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "success": { + "type": [ + "null", + "string" + ] + } + } + }, + "discount_amount": { + "type": [ + "null", + "number" + ] + }, + "escrow_status": { + "type": [ + "null", + "string" + ] + }, + "facilated_details": { + "type": [ + "null", + "object" + ], + "properties": { + "merchant_id": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "payment_method_nonce": { + "type": [ + "null", + "string" + ] + } + } + }, + "facilitator_details": { + "type": [ + "null", + "object" + ], + "properties": { + "oauth_application_client_id": { + "type": [ + "null", + "string" + ] + }, + "oauth_application_name": { + "type": [ + "null", + "string" + ] + }, + "source_payment_method_token": { + "type": [ + "null", + "string" + ] + } + } + }, + "gateway_rejection_reason": { + "type": [ + "null", + "string" + ] + }, + "graphql_id": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "masterpass_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_account_id": { + "type": [ + "null", + "string" + ] + }, + "merchant_address": { + "type": [ + "null", + "object" + ], + "properties": { + "locality": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_identification_number": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "network_response_code": { + "type": [ + "null", + "string" + ] + }, + "network_response_text": { + "type": [ + "null", + "string" + ] + }, + "network_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "order_id": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_type": { + "type": [ + "null", + "string" + ] + }, + "payment_receipt": { + "type": [ + "null", + "object" + ], + "properties": { + "account_balance": { + "type": [ + "null", + "number" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "card_last_4": { + "type": [ + "null", + "string" + ] + }, + "card_present_data": { + "type": [ + "null", + "object" + ], + "properties": { + "application_cryptogram": { + "type": [ + "null", + "string" + ] + }, + "application_identifier": { + "type": [ + "null", + "string" + ] + }, + "application_interchange_profile": { + "type": [ + "null", + "string" + ] + }, + "application_name": { + "type": [ + "null", + "string" + ] + }, + "application_transaction_counter": { + "type": [ + "null", + "string" + ] + }, + "application_usage_control": { + "type": [ + "null", + "string" + ] + }, + "authorization_mode": { + "type": [ + "null", + "string" + ] + }, + "authorization_response_code": { + "type": [ + "null", + "string" + ] + }, + "card_entry_method": { + "type": [ + "null", + "string" + ] + }, + "card_sequence_number": { + "type": [ + "null", + "string" + ] + }, + "cardholder_verification_method_results": { + "type": [ + "null", + "string" + ] + }, + "cashback_amount": { + "type": [ + "null", + "string" + ] + }, + "cryptogram_information_data": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_default": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_denial": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_online": { + "type": [ + "null", + "string" + ] + }, + "issuer_authentication_data": { + "type": [ + "null", + "string" + ] + }, + "terminal_country_code": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_date": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_type": { + "type": [ + "null", + "string" + ] + }, + "termination_verification_result": { + "type": [ + "null", + "string" + ] + }, + "unpredictable_number": { + "type": [ + "null", + "string" + ] + } + } + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "global_id": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "merchant_address": { + "type": [ + "null", + "object" + ], + "properties": { + "locality": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_identification_number": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "pin_verified": { + "type": [ + "null", + "boolean" + ] + }, + "processor_authorization_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_text": { + "type": [ + "null", + "string" + ] + }, + "terminal_identification_number": { + "type": [ + "null", + "string" + ] + }, + "type": { + "type": [ + "null", + "string" + ] + } + } + }, + "paypal_details": { + "type": [ + "null", + "object" + ], + "properties": { + "authorization_id": { + "type": [ + "null", + "string" + ] + }, + "capture_id": { + "type": [ + "null", + "string" + ] + }, + "custom_field": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "implicitly_vaulted_payment_method_global_id": { + "type": [ + "null", + "string" + ] + }, + "implicitly_vaulted_payment_method_token": { + "type": [ + "null", + "string" + ] + }, + "payer_email": { + "type": [ + "null", + "string" + ] + }, + "payer_first_name": { + "type": [ + "null", + "string" + ] + }, + "payer_id": { + "type": [ + "null", + "string" + ] + }, + "payer_last_name": { + "type": [ + "null", + "string" + ] + }, + "payer_phone": { + "type": [ + "null", + "string" + ] + }, + "payer_status": { + "type": [ + "null", + "string" + ] + }, + "payment_id": { + "type": [ + "null", + "string" + ] + }, + "refund_description": { + "type": [ + "null", + "string" + ] + }, + "refund_from_transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "refund_from_transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "refund_id": { + "type": [ + "null", + "string" + ] + }, + "refund_reason": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_currency_code": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_discount_amount": { + "type": [ + "null", + "string" + ] + }, + "select_financing_discount_percentage": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_monthly_payment_amount": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_term": { + "type": [ + "null", + "string" + ] + }, + "seller_protection_status": { + "type": [ + "null", + "string" + ] + }, + "shipping_option_id": { + "type": [ + "null", + "string" + ] + }, + "tax_id": { + "type": [ + "null", + "string" + ] + }, + "tax_id_type": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + } + } + }, + "paypal_here_details": { + "type": [ + "null", + "object" + ], + "properties": { + "authorization_id": { + "type": [ + "null", + "string" + ] + }, + "capture_id": { + "type": [ + "null", + "string" + ] + }, + "invoice_id": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_id": { + "type": [ + "null", + "string" + ] + }, + "payment_type": { + "type": [ + "null", + "string" + ] + }, + "refund_id": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "transaction_initiation_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "transaction_updated_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "pin_verified": { + "type": [ + "null", + "boolean" + ] + }, + "plan_id": { + "type": [ + "null", + "string" + ] + }, + "processor_authorization_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_text": { + "type": [ + "null", + "string" + ] + }, + "processor_response_type": { + "type": [ + "null", + "string" + ] + }, + "processor_settlement_response_text": { + "type": [ + "null", + "string" + ] + }, + "purchase_order_number": { + "type": [ + "null", + "string" + ] + }, + "recurring": { + "type": [ + "null", + "boolean" + ] + }, + "refund_ids": { + "type": [ + "null", + "string" + ] + }, + "refunded_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "response_emv_data": { + "type": [ + "null", + "string" + ] + }, + "retrieval_reference_number": { + "type": [ + "null", + "string" + ] + }, + "risk_data": { + "type": [ + "null", + "object" + ], + "properties": { + "decision": { + "type": [ + "null", + "string" + ] + }, + "decision_reasons": { + "type": [ + "null", + "string" + ] + }, + "device_data_captured": { + "type": [ + "null", + "boolean" + ] + }, + "fraud_service_provider": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "transaction_risk_score": { + "type": [ + "null", + "string" + ] + } + } + }, + "samsung_pay_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "sca_exemption_requested": { + "type": [ + "null", + "string" + ] + }, + "service_fee_amount": { + "type": [ + "null", + "number" + ] + }, + "settlement_batch_id": { + "type": [ + "null", + "string" + ] + }, + "shipping_amount": { + "type": [ + "null", + "number" + ] + }, + "shipping_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "ships_from_postal_code": { + "type": [ + "null", + "string" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "subscription_details": { + "type": [ + "null", + "object" + ], + "properties": { + "billing_period_end_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "billing_period_start_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "subscription_id": { + "type": [ + "null", + "string" + ] + }, + "tax_amount": { + "type": [ + "null", + "number" + ] + }, + "tax_exempt": { + "type": [ + "null", + "boolean" + ] + }, + "terminal_identification_number": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_info": { + "type": [ + "null", + "object" + ], + "properties": { + "cavv": { + "type": [ + "null", + "string" + ] + }, + "ds_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "eci_flag": { + "type": [ + "null", + "string" + ] + }, + "enrolled": { + "type": [ + "null", + "string" + ] + }, + "liability_shift_possible": { + "type": [ + "null", + "boolean" + ] + }, + "liability_shifted": { + "type": [ + "null", + "boolean" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_version": { + "type": [ + "null", + "string" + ] + }, + "xid": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": { + "type": [ + "null", + "string" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "venmo_account_details": { + "type": [ + "null", + "object" + ], + "properties": { + "image_url": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "username": { + "type": [ + "null", + "string" + ] + }, + "venmo_user_id": { + "type": [ + "null", + "string" + ] + } + } + }, + "visa_checkout_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "call_id": { + "type": [ + "null", + "string" + ] + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "voice_referral_number": { + "type": [ + "null", + "integer" + ] + } + } + } + }, + "trial_duration": { + "type": [ + "null", + "integer" + ] + }, + "trial_duration_unit": { + "type": [ + "null", + "string" + ] + }, + "trial_period": { + "type": [ + "null", + "boolean" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "virtual_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_type": { + "type": [ + "null", + "string" + ] + } + } + }, + "company": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "credit_cards": { + "type": [ + "null", + "array" + ], + "items": { + "$ref": "/shared/cards.json", + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "customer_id": { + "type": [ + "null", + "string" + ] + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "card_holder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "default": { + "type": [ + "null", + "boolean" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "expired": { + "type": [ + "null", + "boolean" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "subscriptions": { + "type": [ + "null", + "array" + ], + "items": { + "addOns": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "amount": { + "type": [ + "null", + "number" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "quantity": { + "type": [ + "null", + "integer" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + } + }, + "balance": { + "type": [ + "null", + "number" + ] + }, + "billing_day_of_month": { + "type": [ + "null", + "integer" + ] + }, + "billing_period_end_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "billing_period_start_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "days_past_due": { + "type": [ + "null", + "integer" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "descriptor": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "discounts": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "amount": { + "type": [ + "null", + "number" + ] + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "quantity": { + "type": [ + "null", + "integer" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + } + }, + "failure_count": { + "type": [ + "null", + "integer" + ] + }, + "first_billing_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "merchant_account_id": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "next_bill_amount": { + "type": [ + "null", + "number" + ] + }, + "next_billing_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "next_billing_period_amount": { + "type": [ + "null", + "number" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "paid_through_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "payment_method_token": { + "type": [ + "null", + "string" + ] + }, + "plan_id": { + "type": [ + "null", + "string" + ] + }, + "price": { + "type": [ + "null", + "number" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "status_history": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "string" + ], + "properties": { + "balance": { + "type": [ + "null", + "string" + ] + }, + "price": { + "type": [ + "null", + "string" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "subscription_source": { + "type": [ + "null", + "string" + ] + } + } + } + }, + "transactions": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "acquirer_reference_number": { + "type": [ + "null", + "string" + ] + }, + "additional_processor_response": { + "type": [ + "null", + "string" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "android_pay_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "google_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "is_network_tokenized": { + "type": [ + "null", + "boolean" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "source_card_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_type": { + "type": [ + "null", + "string" + ] + } + } + }, + "apple_pay_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_name": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "authorization_adjustments": { + "type": [ + "null", + "string" + ] + }, + "authorization_expires_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "avs_error_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_postal_code_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_street_address_response_code": { + "type": [ + "null", + "string" + ] + }, + "billing_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha_2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha_3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "channel": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "credit_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "payment_reader_attributes": { + "type": [ + "null", + "object" + ], + "properties": { + "application_cryptogram": { + "type": [ + "null", + "string" + ] + }, + "application_identifier": { + "type": [ + "null", + "string" + ] + }, + "application_interchange_profile": { + "type": [ + "null", + "string" + ] + }, + "application_name": { + "type": [ + "null", + "string" + ] + }, + "application_transaction_counter": { + "type": [ + "null", + "string" + ] + }, + "application_usage_control": { + "type": [ + "null", + "string" + ] + }, + "authorization_mode": { + "type": [ + "null", + "string" + ] + }, + "authorization_response_code": { + "type": [ + "null", + "string" + ] + }, + "card_entry_method": { + "type": [ + "null", + "string" + ] + }, + "card_sequence_number": { + "type": [ + "null", + "string" + ] + }, + "cardholder_verification_method_results": { + "type": [ + "null", + "string" + ] + }, + "cashback_amount": { + "type": [ + "null", + "string" + ] + }, + "cryptogram_information_data": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_default": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_denial": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_online": { + "type": [ + "null", + "string" + ] + }, + "issuer_authentication_data": { + "type": [ + "null", + "string" + ] + }, + "terminal_country_code": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "terminal_transaction_type": { + "type": [ + "null", + "string" + ] + }, + "terminal_verification_result": { + "type": [ + "null", + "string" + ] + }, + "unpredictable_number": { + "type": [ + "null", + "string" + ] + } + } + }, + "unique_number_identifier": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "custom_fields": { + "type": [ + "null", + "string" + ] + }, + "customer_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "fax": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "website": { + "type": [ + "null", + "string" + ] + } + } + }, + "cvv_response_code": { + "type": [ + "null", + "string" + ] + }, + "descriptor": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "disbursement_details": { + "type": [ + "null", + "object" + ], + "properties": { + "disbursement_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "funds_held": { + "type": [ + "null", + "boolean" + ] + }, + "settlement_amount": { + "type": [ + "null", + "number" + ] + }, + "settlement_base_currency_exchange_rate": { + "type": [ + "null", + "string" + ] + }, + "settlement_currency_exchange_rate": { + "type": [ + "null", + "string" + ] + }, + "settlement_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "success": { + "type": [ + "null", + "string" + ] + } + } + }, + "discount_amount": { + "type": [ + "null", + "number" + ] + }, + "escrow_status": { + "type": [ + "null", + "string" + ] + }, + "facilated_details": { + "type": [ + "null", + "object" + ], + "properties": { + "merchant_id": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "payment_method_nonce": { + "type": [ + "null", + "string" + ] + } + } + }, + "facilitator_details": { + "type": [ + "null", + "object" + ], + "properties": { + "oauth_application_client_id": { + "type": [ + "null", + "string" + ] + }, + "oauth_application_name": { + "type": [ + "null", + "string" + ] + }, + "source_payment_method_token": { + "type": [ + "null", + "string" + ] + } + } + }, + "gateway_rejection_reason": { + "type": [ + "null", + "string" + ] + }, + "graphql_id": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "masterpass_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_account_id": { + "type": [ + "null", + "string" + ] + }, + "merchant_address": { + "type": [ + "null", + "object" + ], + "properties": { + "locality": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_identification_number": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "network_response_code": { + "type": [ + "null", + "string" + ] + }, + "network_response_text": { + "type": [ + "null", + "string" + ] + }, + "network_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "order_id": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_type": { + "type": [ + "null", + "string" + ] + }, + "payment_receipt": { + "type": [ + "null", + "object" + ], + "properties": { + "account_balance": { + "type": [ + "null", + "number" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "card_last_4": { + "type": [ + "null", + "string" + ] + }, + "card_present_data": { + "type": [ + "null", + "object" + ], + "properties": { + "application_cryptogram": { + "type": [ + "null", + "string" + ] + }, + "application_identifier": { + "type": [ + "null", + "string" + ] + }, + "application_interchange_profile": { + "type": [ + "null", + "string" + ] + }, + "application_name": { + "type": [ + "null", + "string" + ] + }, + "application_transaction_counter": { + "type": [ + "null", + "string" + ] + }, + "application_usage_control": { + "type": [ + "null", + "string" + ] + }, + "authorization_mode": { + "type": [ + "null", + "string" + ] + }, + "authorization_response_code": { + "type": [ + "null", + "string" + ] + }, + "card_entry_method": { + "type": [ + "null", + "string" + ] + }, + "card_sequence_number": { + "type": [ + "null", + "string" + ] + }, + "cardholder_verification_method_results": { + "type": [ + "null", + "string" + ] + }, + "cashback_amount": { + "type": [ + "null", + "string" + ] + }, + "cryptogram_information_data": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_default": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_denial": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_online": { + "type": [ + "null", + "string" + ] + }, + "issuer_authentication_data": { + "type": [ + "null", + "string" + ] + }, + "terminal_country_code": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_date": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_type": { + "type": [ + "null", + "string" + ] + }, + "termination_verification_result": { + "type": [ + "null", + "string" + ] + }, + "unpredictable_number": { + "type": [ + "null", + "string" + ] + } + } + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "global_id": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "merchant_address": { + "type": [ + "null", + "object" + ], + "properties": { + "locality": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_identification_number": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "pin_verified": { + "type": [ + "null", + "boolean" + ] + }, + "processor_authorization_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_text": { + "type": [ + "null", + "string" + ] + }, + "terminal_identification_number": { + "type": [ + "null", + "string" + ] + }, + "type": { + "type": [ + "null", + "string" + ] + } + } + }, + "paypal_details": { + "type": [ + "null", + "object" + ], + "properties": { + "authorization_id": { + "type": [ + "null", + "string" + ] + }, + "capture_id": { + "type": [ + "null", + "string" + ] + }, + "custom_field": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "implicitly_vaulted_payment_method_global_id": { + "type": [ + "null", + "string" + ] + }, + "implicitly_vaulted_payment_method_token": { + "type": [ + "null", + "string" + ] + }, + "payer_email": { + "type": [ + "null", + "string" + ] + }, + "payer_first_name": { + "type": [ + "null", + "string" + ] + }, + "payer_id": { + "type": [ + "null", + "string" + ] + }, + "payer_last_name": { + "type": [ + "null", + "string" + ] + }, + "payer_phone": { + "type": [ + "null", + "string" + ] + }, + "payer_status": { + "type": [ + "null", + "string" + ] + }, + "payment_id": { + "type": [ + "null", + "string" + ] + }, + "refund_description": { + "type": [ + "null", + "string" + ] + }, + "refund_from_transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "refund_from_transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "refund_id": { + "type": [ + "null", + "string" + ] + }, + "refund_reason": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_currency_code": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_discount_amount": { + "type": [ + "null", + "string" + ] + }, + "select_financing_discount_percentage": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_monthly_payment_amount": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_term": { + "type": [ + "null", + "string" + ] + }, + "seller_protection_status": { + "type": [ + "null", + "string" + ] + }, + "shipping_option_id": { + "type": [ + "null", + "string" + ] + }, + "tax_id": { + "type": [ + "null", + "string" + ] + }, + "tax_id_type": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + } + } + }, + "paypal_here_details": { + "type": [ + "null", + "object" + ], + "properties": { + "authorization_id": { + "type": [ + "null", + "string" + ] + }, + "capture_id": { + "type": [ + "null", + "string" + ] + }, + "invoice_id": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_id": { + "type": [ + "null", + "string" + ] + }, + "payment_type": { + "type": [ + "null", + "string" + ] + }, + "refund_id": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "transaction_initiation_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "transaction_updated_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "pin_verified": { + "type": [ + "null", + "boolean" + ] + }, + "plan_id": { + "type": [ + "null", + "string" + ] + }, + "processor_authorization_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_text": { + "type": [ + "null", + "string" + ] + }, + "processor_response_type": { + "type": [ + "null", + "string" + ] + }, + "processor_settlement_response_text": { + "type": [ + "null", + "string" + ] + }, + "purchase_order_number": { + "type": [ + "null", + "string" + ] + }, + "recurring": { + "type": [ + "null", + "boolean" + ] + }, + "refund_ids": { + "type": [ + "null", + "string" + ] + }, + "refunded_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "response_emv_data": { + "type": [ + "null", + "string" + ] + }, + "retrieval_reference_number": { + "type": [ + "null", + "string" + ] + }, + "risk_data": { + "type": [ + "null", + "object" + ], + "properties": { + "decision": { + "type": [ + "null", + "string" + ] + }, + "decision_reasons": { + "type": [ + "null", + "string" + ] + }, + "device_data_captured": { + "type": [ + "null", + "boolean" + ] + }, + "fraud_service_provider": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "transaction_risk_score": { + "type": [ + "null", + "string" + ] + } + } + }, + "samsung_pay_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "sca_exemption_requested": { + "type": [ + "null", + "string" + ] + }, + "service_fee_amount": { + "type": [ + "null", + "number" + ] + }, + "settlement_batch_id": { + "type": [ + "null", + "string" + ] + }, + "shipping_amount": { + "type": [ + "null", + "number" + ] + }, + "shipping_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "ships_from_postal_code": { + "type": [ + "null", + "string" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "subscription_details": { + "type": [ + "null", + "object" + ], + "properties": { + "billing_period_end_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "billing_period_start_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "subscription_id": { + "type": [ + "null", + "string" + ] + }, + "tax_amount": { + "type": [ + "null", + "number" + ] + }, + "tax_exempt": { + "type": [ + "null", + "boolean" + ] + }, + "terminal_identification_number": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_info": { + "type": [ + "null", + "object" + ], + "properties": { + "cavv": { + "type": [ + "null", + "string" + ] + }, + "ds_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "eci_flag": { + "type": [ + "null", + "string" + ] + }, + "enrolled": { + "type": [ + "null", + "string" + ] + }, + "liability_shift_possible": { + "type": [ + "null", + "boolean" + ] + }, + "liability_shifted": { + "type": [ + "null", + "boolean" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_version": { + "type": [ + "null", + "string" + ] + }, + "xid": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": { + "type": [ + "null", + "string" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "venmo_account_details": { + "type": [ + "null", + "object" + ], + "properties": { + "image_url": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "username": { + "type": [ + "null", + "string" + ] + }, + "venmo_user_id": { + "type": [ + "null", + "string" + ] + } + } + }, + "visa_checkout_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "call_id": { + "type": [ + "null", + "string" + ] + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "voice_referral_number": { + "type": [ + "null", + "integer" + ] + } + } + } + }, + "trial_duration": { + "type": [ + "null", + "integer" + ] + }, + "trial_duration_unit": { + "type": [ + "null", + "string" + ] + }, + "trial_period": { + "type": [ + "null", + "boolean" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "unique_number_identifier": { + "type": [ + "null", + "string" + ] + }, + "verification": { + "type": [ + "null", + "object" + ], + "properties": { + "additional_processor_response": { + "type": [ + "null", + "string" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "avs_error_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_postal_code_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_street_address_response_code": { + "type": [ + "null", + "string" + ] + }, + "billing": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "credit_card": { + "type": [ + "null", + "object" + ], + "properties": { + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "unique_number_identifier": { + "type": [ + "null", + "string" + ] + } + } + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "cvv_response_code": { + "type": [ + "null", + "string" + ] + }, + "gateway_rejection_reason": { + "type": [ + "null", + "string" + ] + }, + "graphql_id": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "merchant_account_id": { + "type": [ + "null", + "string" + ] + }, + "network_response_code": { + "type": [ + "null", + "string" + ] + }, + "network_response_text": { + "type": [ + "null", + "string" + ] + }, + "processor_response_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_text": { + "type": [ + "null", + "string" + ] + }, + "processor_response_type": { + "type": [ + "null", + "string" + ] + }, + "risk_data": { + "type": [ + "null", + "object" + ], + "properties": { + "decision": { + "type": [ + "null", + "string" + ] + }, + "decision_reasons": { + "type": [ + "null", + "string" + ] + }, + "device_data_captured": { + "type": [ + "null", + "boolean" + ] + }, + "fraud_service_provider": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "transaction_risk_score": { + "type": [ + "null", + "string" + ] + } + } + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_info": { + "type": [ + "null", + "object" + ], + "properties": { + "cavv": { + "type": [ + "null", + "string" + ] + }, + "ds_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "eci_flag": { + "type": [ + "null", + "string" + ] + }, + "enrolled": { + "type": [ + "null", + "string" + ] + }, + "liability_shift_possible": { + "type": [ + "null", + "boolean" + ] + }, + "liability_shifted": { + "type": [ + "null", + "boolean" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_version": { + "type": [ + "null", + "string" + ] + }, + "xid": { + "type": [ + "null", + "string" + ] + } + } + } + } + } + } + }, + "custom_fields": { + "type": [ + "null", + "string" + ] + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "fax": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "graphql_id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "masterpass_cards": { + "type": [ + "null", + "array" + ], + "items": { + "$ref": "/shared/cards.json", + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "customer_id": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "default": { + "type": [ + "null", + "boolean" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "expired": { + "type": [ + "null", + "boolean" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "subscriptions": { + "type": [ + "null", + "array" + ], + "items": { + "addOns": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "amount": { + "type": [ + "null", + "number" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "quantity": { + "type": [ + "null", + "integer" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + } + }, + "balance": { + "type": [ + "null", + "number" + ] + }, + "billing_day_of_month": { + "type": [ + "null", + "integer" + ] + }, + "billing_period_end_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "billing_period_start_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "days_past_due": { + "type": [ + "null", + "integer" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "descriptor": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "discounts": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "amount": { + "type": [ + "null", + "number" + ] + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "quantity": { + "type": [ + "null", + "integer" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + } + }, + "failure_count": { + "type": [ + "null", + "integer" + ] + }, + "first_billing_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "merchant_account_id": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "next_bill_amount": { + "type": [ + "null", + "number" + ] + }, + "next_billing_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "next_billing_period_amount": { + "type": [ + "null", + "number" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "paid_through_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "payment_method_token": { + "type": [ + "null", + "string" + ] + }, + "plan_id": { + "type": [ + "null", + "string" + ] + }, + "price": { + "type": [ + "null", + "number" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "status_history": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "string" + ], + "properties": { + "balance": { + "type": [ + "null", + "string" + ] + }, + "price": { + "type": [ + "null", + "string" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "subscription_source": { + "type": [ + "null", + "string" + ] + } + } + } + }, + "transactions": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "acquirer_reference_number": { + "type": [ + "null", + "string" + ] + }, + "additional_processor_response": { + "type": [ + "null", + "string" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "android_pay_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "google_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "is_network_tokenized": { + "type": [ + "null", + "boolean" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "source_card_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_type": { + "type": [ + "null", + "string" + ] + } + } + }, + "apple_pay_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_name": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "authorization_adjustments": { + "type": [ + "null", + "string" + ] + }, + "authorization_expires_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "avs_error_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_postal_code_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_street_address_response_code": { + "type": [ + "null", + "string" + ] + }, + "billing_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha_2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha_3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "channel": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "credit_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "payment_reader_attributes": { + "type": [ + "null", + "object" + ], + "properties": { + "application_cryptogram": { + "type": [ + "null", + "string" + ] + }, + "application_identifier": { + "type": [ + "null", + "string" + ] + }, + "application_interchange_profile": { + "type": [ + "null", + "string" + ] + }, + "application_name": { + "type": [ + "null", + "string" + ] + }, + "application_transaction_counter": { + "type": [ + "null", + "string" + ] + }, + "application_usage_control": { + "type": [ + "null", + "string" + ] + }, + "authorization_mode": { + "type": [ + "null", + "string" + ] + }, + "authorization_response_code": { + "type": [ + "null", + "string" + ] + }, + "card_entry_method": { + "type": [ + "null", + "string" + ] + }, + "card_sequence_number": { + "type": [ + "null", + "string" + ] + }, + "cardholder_verification_method_results": { + "type": [ + "null", + "string" + ] + }, + "cashback_amount": { + "type": [ + "null", + "string" + ] + }, + "cryptogram_information_data": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_default": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_denial": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_online": { + "type": [ + "null", + "string" + ] + }, + "issuer_authentication_data": { + "type": [ + "null", + "string" + ] + }, + "terminal_country_code": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "terminal_transaction_type": { + "type": [ + "null", + "string" + ] + }, + "terminal_verification_result": { + "type": [ + "null", + "string" + ] + }, + "unpredictable_number": { + "type": [ + "null", + "string" + ] + } + } + }, + "unique_number_identifier": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "custom_fields": { + "type": [ + "null", + "string" + ] + }, + "customer_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "fax": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "website": { + "type": [ + "null", + "string" + ] + } + } + }, + "cvv_response_code": { + "type": [ + "null", + "string" + ] + }, + "descriptor": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "disbursement_details": { + "type": [ + "null", + "object" + ], + "properties": { + "disbursement_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "funds_held": { + "type": [ + "null", + "boolean" + ] + }, + "settlement_amount": { + "type": [ + "null", + "number" + ] + }, + "settlement_base_currency_exchange_rate": { + "type": [ + "null", + "string" + ] + }, + "settlement_currency_exchange_rate": { + "type": [ + "null", + "string" + ] + }, + "settlement_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "success": { + "type": [ + "null", + "string" + ] + } + } + }, + "discount_amount": { + "type": [ + "null", + "number" + ] + }, + "escrow_status": { + "type": [ + "null", + "string" + ] + }, + "facilated_details": { + "type": [ + "null", + "object" + ], + "properties": { + "merchant_id": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "payment_method_nonce": { + "type": [ + "null", + "string" + ] + } + } + }, + "facilitator_details": { + "type": [ + "null", + "object" + ], + "properties": { + "oauth_application_client_id": { + "type": [ + "null", + "string" + ] + }, + "oauth_application_name": { + "type": [ + "null", + "string" + ] + }, + "source_payment_method_token": { + "type": [ + "null", + "string" + ] + } + } + }, + "gateway_rejection_reason": { + "type": [ + "null", + "string" + ] + }, + "graphql_id": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "masterpass_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_account_id": { + "type": [ + "null", + "string" + ] + }, + "merchant_address": { + "type": [ + "null", + "object" + ], + "properties": { + "locality": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_identification_number": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "network_response_code": { + "type": [ + "null", + "string" + ] + }, + "network_response_text": { + "type": [ + "null", + "string" + ] + }, + "network_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "order_id": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_type": { + "type": [ + "null", + "string" + ] + }, + "payment_receipt": { + "type": [ + "null", + "object" + ], + "properties": { + "account_balance": { + "type": [ + "null", + "number" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "card_last_4": { + "type": [ + "null", + "string" + ] + }, + "card_present_data": { + "type": [ + "null", + "object" + ], + "properties": { + "application_cryptogram": { + "type": [ + "null", + "string" + ] + }, + "application_identifier": { + "type": [ + "null", + "string" + ] + }, + "application_interchange_profile": { + "type": [ + "null", + "string" + ] + }, + "application_name": { + "type": [ + "null", + "string" + ] + }, + "application_transaction_counter": { + "type": [ + "null", + "string" + ] + }, + "application_usage_control": { + "type": [ + "null", + "string" + ] + }, + "authorization_mode": { + "type": [ + "null", + "string" + ] + }, + "authorization_response_code": { + "type": [ + "null", + "string" + ] + }, + "card_entry_method": { + "type": [ + "null", + "string" + ] + }, + "card_sequence_number": { + "type": [ + "null", + "string" + ] + }, + "cardholder_verification_method_results": { + "type": [ + "null", + "string" + ] + }, + "cashback_amount": { + "type": [ + "null", + "string" + ] + }, + "cryptogram_information_data": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_default": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_denial": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_online": { + "type": [ + "null", + "string" + ] + }, + "issuer_authentication_data": { + "type": [ + "null", + "string" + ] + }, + "terminal_country_code": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_date": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_type": { + "type": [ + "null", + "string" + ] + }, + "termination_verification_result": { + "type": [ + "null", + "string" + ] + }, + "unpredictable_number": { + "type": [ + "null", + "string" + ] + } + } + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "global_id": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "merchant_address": { + "type": [ + "null", + "object" + ], + "properties": { + "locality": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_identification_number": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "pin_verified": { + "type": [ + "null", + "boolean" + ] + }, + "processor_authorization_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_text": { + "type": [ + "null", + "string" + ] + }, + "terminal_identification_number": { + "type": [ + "null", + "string" + ] + }, + "type": { + "type": [ + "null", + "string" + ] + } + } + }, + "paypal_details": { + "type": [ + "null", + "object" + ], + "properties": { + "authorization_id": { + "type": [ + "null", + "string" + ] + }, + "capture_id": { + "type": [ + "null", + "string" + ] + }, + "custom_field": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "implicitly_vaulted_payment_method_global_id": { + "type": [ + "null", + "string" + ] + }, + "implicitly_vaulted_payment_method_token": { + "type": [ + "null", + "string" + ] + }, + "payer_email": { + "type": [ + "null", + "string" + ] + }, + "payer_first_name": { + "type": [ + "null", + "string" + ] + }, + "payer_id": { + "type": [ + "null", + "string" + ] + }, + "payer_last_name": { + "type": [ + "null", + "string" + ] + }, + "payer_phone": { + "type": [ + "null", + "string" + ] + }, + "payer_status": { + "type": [ + "null", + "string" + ] + }, + "payment_id": { + "type": [ + "null", + "string" + ] + }, + "refund_description": { + "type": [ + "null", + "string" + ] + }, + "refund_from_transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "refund_from_transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "refund_id": { + "type": [ + "null", + "string" + ] + }, + "refund_reason": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_currency_code": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_discount_amount": { + "type": [ + "null", + "string" + ] + }, + "select_financing_discount_percentage": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_monthly_payment_amount": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_term": { + "type": [ + "null", + "string" + ] + }, + "seller_protection_status": { + "type": [ + "null", + "string" + ] + }, + "shipping_option_id": { + "type": [ + "null", + "string" + ] + }, + "tax_id": { + "type": [ + "null", + "string" + ] + }, + "tax_id_type": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + } + } + }, + "paypal_here_details": { + "type": [ + "null", + "object" + ], + "properties": { + "authorization_id": { + "type": [ + "null", + "string" + ] + }, + "capture_id": { + "type": [ + "null", + "string" + ] + }, + "invoice_id": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_id": { + "type": [ + "null", + "string" + ] + }, + "payment_type": { + "type": [ + "null", + "string" + ] + }, + "refund_id": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "transaction_initiation_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "transaction_updated_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "pin_verified": { + "type": [ + "null", + "boolean" + ] + }, + "plan_id": { + "type": [ + "null", + "string" + ] + }, + "processor_authorization_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_text": { + "type": [ + "null", + "string" + ] + }, + "processor_response_type": { + "type": [ + "null", + "string" + ] + }, + "processor_settlement_response_text": { + "type": [ + "null", + "string" + ] + }, + "purchase_order_number": { + "type": [ + "null", + "string" + ] + }, + "recurring": { + "type": [ + "null", + "boolean" + ] + }, + "refund_ids": { + "type": [ + "null", + "string" + ] + }, + "refunded_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "response_emv_data": { + "type": [ + "null", + "string" + ] + }, + "retrieval_reference_number": { + "type": [ + "null", + "string" + ] + }, + "risk_data": { + "type": [ + "null", + "object" + ], + "properties": { + "decision": { + "type": [ + "null", + "string" + ] + }, + "decision_reasons": { + "type": [ + "null", + "string" + ] + }, + "device_data_captured": { + "type": [ + "null", + "boolean" + ] + }, + "fraud_service_provider": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "transaction_risk_score": { + "type": [ + "null", + "string" + ] + } + } + }, + "samsung_pay_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "sca_exemption_requested": { + "type": [ + "null", + "string" + ] + }, + "service_fee_amount": { + "type": [ + "null", + "number" + ] + }, + "settlement_batch_id": { + "type": [ + "null", + "string" + ] + }, + "shipping_amount": { + "type": [ + "null", + "number" + ] + }, + "shipping_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "ships_from_postal_code": { + "type": [ + "null", + "string" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "subscription_details": { + "type": [ + "null", + "object" + ], + "properties": { + "billing_period_end_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "billing_period_start_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "subscription_id": { + "type": [ + "null", + "string" + ] + }, + "tax_amount": { + "type": [ + "null", + "number" + ] + }, + "tax_exempt": { + "type": [ + "null", + "boolean" + ] + }, + "terminal_identification_number": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_info": { + "type": [ + "null", + "object" + ], + "properties": { + "cavv": { + "type": [ + "null", + "string" + ] + }, + "ds_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "eci_flag": { + "type": [ + "null", + "string" + ] + }, + "enrolled": { + "type": [ + "null", + "string" + ] + }, + "liability_shift_possible": { + "type": [ + "null", + "boolean" + ] + }, + "liability_shifted": { + "type": [ + "null", + "boolean" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_version": { + "type": [ + "null", + "string" + ] + }, + "xid": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": { + "type": [ + "null", + "string" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "venmo_account_details": { + "type": [ + "null", + "object" + ], + "properties": { + "image_url": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "username": { + "type": [ + "null", + "string" + ] + }, + "venmo_user_id": { + "type": [ + "null", + "string" + ] + } + } + }, + "visa_checkout_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "call_id": { + "type": [ + "null", + "string" + ] + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "voice_referral_number": { + "type": [ + "null", + "integer" + ] + } + } + } + }, + "trial_duration": { + "type": [ + "null", + "integer" + ] + }, + "trial_duration_unit": { + "type": [ + "null", + "string" + ] + }, + "trial_period": { + "type": [ + "null", + "boolean" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "unique_number_identifier": { + "type": [ + "null", + "string" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "payment_methods": { + "type": [ + "null", + "array" + ], + "items": { + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "paypal_accounts": { + "type": [ + "null", + "array" + ], + "items": { + "billing_agreement_id": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "customer_id": { + "type": [ + "null", + "string" + ] + }, + "default": { + "type": [ + "null", + "boolean" + ] + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "payer_id": { + "type": [ + "null", + "string" + ] + }, + "revoked_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "subscriptions": { + "type": [ + "null", + "array" + ], + "items": { + "addOns": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "amount": { + "type": [ + "null", + "number" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "quantity": { + "type": [ + "null", + "integer" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + } + }, + "balance": { + "type": [ + "null", + "number" + ] + }, + "billing_day_of_month": { + "type": [ + "null", + "integer" + ] + }, + "billing_period_end_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "billing_period_start_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "days_past_due": { + "type": [ + "null", + "integer" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "descriptor": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "discounts": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "amount": { + "type": [ + "null", + "number" + ] + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "quantity": { + "type": [ + "null", + "integer" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + } + }, + "failure_count": { + "type": [ + "null", + "integer" + ] + }, + "first_billing_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "merchant_account_id": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "next_bill_amount": { + "type": [ + "null", + "number" + ] + }, + "next_billing_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "next_billing_period_amount": { + "type": [ + "null", + "number" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "paid_through_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "payment_method_token": { + "type": [ + "null", + "string" + ] + }, + "plan_id": { + "type": [ + "null", + "string" + ] + }, + "price": { + "type": [ + "null", + "number" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "status_history": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "string" + ], + "properties": { + "balance": { + "type": [ + "null", + "string" + ] + }, + "price": { + "type": [ + "null", + "string" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "subscription_source": { + "type": [ + "null", + "string" + ] + } + } + } + }, + "transactions": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "acquirer_reference_number": { + "type": [ + "null", + "string" + ] + }, + "additional_processor_response": { + "type": [ + "null", + "string" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "android_pay_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "google_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "is_network_tokenized": { + "type": [ + "null", + "boolean" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "source_card_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_type": { + "type": [ + "null", + "string" + ] + } + } + }, + "apple_pay_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_name": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "authorization_adjustments": { + "type": [ + "null", + "string" + ] + }, + "authorization_expires_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "avs_error_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_postal_code_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_street_address_response_code": { + "type": [ + "null", + "string" + ] + }, + "billing_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha_2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha_3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "channel": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "credit_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "payment_reader_attributes": { + "type": [ + "null", + "object" + ], + "properties": { + "application_cryptogram": { + "type": [ + "null", + "string" + ] + }, + "application_identifier": { + "type": [ + "null", + "string" + ] + }, + "application_interchange_profile": { + "type": [ + "null", + "string" + ] + }, + "application_name": { + "type": [ + "null", + "string" + ] + }, + "application_transaction_counter": { + "type": [ + "null", + "string" + ] + }, + "application_usage_control": { + "type": [ + "null", + "string" + ] + }, + "authorization_mode": { + "type": [ + "null", + "string" + ] + }, + "authorization_response_code": { + "type": [ + "null", + "string" + ] + }, + "card_entry_method": { + "type": [ + "null", + "string" + ] + }, + "card_sequence_number": { + "type": [ + "null", + "string" + ] + }, + "cardholder_verification_method_results": { + "type": [ + "null", + "string" + ] + }, + "cashback_amount": { + "type": [ + "null", + "string" + ] + }, + "cryptogram_information_data": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_default": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_denial": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_online": { + "type": [ + "null", + "string" + ] + }, + "issuer_authentication_data": { + "type": [ + "null", + "string" + ] + }, + "terminal_country_code": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "terminal_transaction_type": { + "type": [ + "null", + "string" + ] + }, + "terminal_verification_result": { + "type": [ + "null", + "string" + ] + }, + "unpredictable_number": { + "type": [ + "null", + "string" + ] + } + } + }, + "unique_number_identifier": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "custom_fields": { + "type": [ + "null", + "string" + ] + }, + "customer_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "fax": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "website": { + "type": [ + "null", + "string" + ] + } + } + }, + "cvv_response_code": { + "type": [ + "null", + "string" + ] + }, + "descriptor": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "disbursement_details": { + "type": [ + "null", + "object" + ], + "properties": { + "disbursement_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "funds_held": { + "type": [ + "null", + "boolean" + ] + }, + "settlement_amount": { + "type": [ + "null", + "number" + ] + }, + "settlement_base_currency_exchange_rate": { + "type": [ + "null", + "string" + ] + }, + "settlement_currency_exchange_rate": { + "type": [ + "null", + "string" + ] + }, + "settlement_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "success": { + "type": [ + "null", + "string" + ] + } + } + }, + "discount_amount": { + "type": [ + "null", + "number" + ] + }, + "escrow_status": { + "type": [ + "null", + "string" + ] + }, + "facilated_details": { + "type": [ + "null", + "object" + ], + "properties": { + "merchant_id": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "payment_method_nonce": { + "type": [ + "null", + "string" + ] + } + } + }, + "facilitator_details": { + "type": [ + "null", + "object" + ], + "properties": { + "oauth_application_client_id": { + "type": [ + "null", + "string" + ] + }, + "oauth_application_name": { + "type": [ + "null", + "string" + ] + }, + "source_payment_method_token": { + "type": [ + "null", + "string" + ] + } + } + }, + "gateway_rejection_reason": { + "type": [ + "null", + "string" + ] + }, + "graphql_id": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "masterpass_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_account_id": { + "type": [ + "null", + "string" + ] + }, + "merchant_address": { + "type": [ + "null", + "object" + ], + "properties": { + "locality": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_identification_number": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "network_response_code": { + "type": [ + "null", + "string" + ] + }, + "network_response_text": { + "type": [ + "null", + "string" + ] + }, + "network_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "order_id": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_type": { + "type": [ + "null", + "string" + ] + }, + "payment_receipt": { + "type": [ + "null", + "object" + ], + "properties": { + "account_balance": { + "type": [ + "null", + "number" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "card_last_4": { + "type": [ + "null", + "string" + ] + }, + "card_present_data": { + "type": [ + "null", + "object" + ], + "properties": { + "application_cryptogram": { + "type": [ + "null", + "string" + ] + }, + "application_identifier": { + "type": [ + "null", + "string" + ] + }, + "application_interchange_profile": { + "type": [ + "null", + "string" + ] + }, + "application_name": { + "type": [ + "null", + "string" + ] + }, + "application_transaction_counter": { + "type": [ + "null", + "string" + ] + }, + "application_usage_control": { + "type": [ + "null", + "string" + ] + }, + "authorization_mode": { + "type": [ + "null", + "string" + ] + }, + "authorization_response_code": { + "type": [ + "null", + "string" + ] + }, + "card_entry_method": { + "type": [ + "null", + "string" + ] + }, + "card_sequence_number": { + "type": [ + "null", + "string" + ] + }, + "cardholder_verification_method_results": { + "type": [ + "null", + "string" + ] + }, + "cashback_amount": { + "type": [ + "null", + "string" + ] + }, + "cryptogram_information_data": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_default": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_denial": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_online": { + "type": [ + "null", + "string" + ] + }, + "issuer_authentication_data": { + "type": [ + "null", + "string" + ] + }, + "terminal_country_code": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_date": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_type": { + "type": [ + "null", + "string" + ] + }, + "termination_verification_result": { + "type": [ + "null", + "string" + ] + }, + "unpredictable_number": { + "type": [ + "null", + "string" + ] + } + } + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "global_id": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "merchant_address": { + "type": [ + "null", + "object" + ], + "properties": { + "locality": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_identification_number": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "pin_verified": { + "type": [ + "null", + "boolean" + ] + }, + "processor_authorization_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_text": { + "type": [ + "null", + "string" + ] + }, + "terminal_identification_number": { + "type": [ + "null", + "string" + ] + }, + "type": { + "type": [ + "null", + "string" + ] + } + } + }, + "paypal_details": { + "type": [ + "null", + "object" + ], + "properties": { + "authorization_id": { + "type": [ + "null", + "string" + ] + }, + "capture_id": { + "type": [ + "null", + "string" + ] + }, + "custom_field": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "implicitly_vaulted_payment_method_global_id": { + "type": [ + "null", + "string" + ] + }, + "implicitly_vaulted_payment_method_token": { + "type": [ + "null", + "string" + ] + }, + "payer_email": { + "type": [ + "null", + "string" + ] + }, + "payer_first_name": { + "type": [ + "null", + "string" + ] + }, + "payer_id": { + "type": [ + "null", + "string" + ] + }, + "payer_last_name": { + "type": [ + "null", + "string" + ] + }, + "payer_phone": { + "type": [ + "null", + "string" + ] + }, + "payer_status": { + "type": [ + "null", + "string" + ] + }, + "payment_id": { + "type": [ + "null", + "string" + ] + }, + "refund_description": { + "type": [ + "null", + "string" + ] + }, + "refund_from_transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "refund_from_transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "refund_id": { + "type": [ + "null", + "string" + ] + }, + "refund_reason": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_currency_code": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_discount_amount": { + "type": [ + "null", + "string" + ] + }, + "select_financing_discount_percentage": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_monthly_payment_amount": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_term": { + "type": [ + "null", + "string" + ] + }, + "seller_protection_status": { + "type": [ + "null", + "string" + ] + }, + "shipping_option_id": { + "type": [ + "null", + "string" + ] + }, + "tax_id": { + "type": [ + "null", + "string" + ] + }, + "tax_id_type": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + } + } + }, + "paypal_here_details": { + "type": [ + "null", + "object" + ], + "properties": { + "authorization_id": { + "type": [ + "null", + "string" + ] + }, + "capture_id": { + "type": [ + "null", + "string" + ] + }, + "invoice_id": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_id": { + "type": [ + "null", + "string" + ] + }, + "payment_type": { + "type": [ + "null", + "string" + ] + }, + "refund_id": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "transaction_initiation_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "transaction_updated_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "pin_verified": { + "type": [ + "null", + "boolean" + ] + }, + "plan_id": { + "type": [ + "null", + "string" + ] + }, + "processor_authorization_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_text": { + "type": [ + "null", + "string" + ] + }, + "processor_response_type": { + "type": [ + "null", + "string" + ] + }, + "processor_settlement_response_text": { + "type": [ + "null", + "string" + ] + }, + "purchase_order_number": { + "type": [ + "null", + "string" + ] + }, + "recurring": { + "type": [ + "null", + "boolean" + ] + }, + "refund_ids": { + "type": [ + "null", + "string" + ] + }, + "refunded_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "response_emv_data": { + "type": [ + "null", + "string" + ] + }, + "retrieval_reference_number": { + "type": [ + "null", + "string" + ] + }, + "risk_data": { + "type": [ + "null", + "object" + ], + "properties": { + "decision": { + "type": [ + "null", + "string" + ] + }, + "decision_reasons": { + "type": [ + "null", + "string" + ] + }, + "device_data_captured": { + "type": [ + "null", + "boolean" + ] + }, + "fraud_service_provider": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "transaction_risk_score": { + "type": [ + "null", + "string" + ] + } + } + }, + "samsung_pay_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "sca_exemption_requested": { + "type": [ + "null", + "string" + ] + }, + "service_fee_amount": { + "type": [ + "null", + "number" + ] + }, + "settlement_batch_id": { + "type": [ + "null", + "string" + ] + }, + "shipping_amount": { + "type": [ + "null", + "number" + ] + }, + "shipping_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "ships_from_postal_code": { + "type": [ + "null", + "string" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "subscription_details": { + "type": [ + "null", + "object" + ], + "properties": { + "billing_period_end_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "billing_period_start_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "subscription_id": { + "type": [ + "null", + "string" + ] + }, + "tax_amount": { + "type": [ + "null", + "number" + ] + }, + "tax_exempt": { + "type": [ + "null", + "boolean" + ] + }, + "terminal_identification_number": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_info": { + "type": [ + "null", + "object" + ], + "properties": { + "cavv": { + "type": [ + "null", + "string" + ] + }, + "ds_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "eci_flag": { + "type": [ + "null", + "string" + ] + }, + "enrolled": { + "type": [ + "null", + "string" + ] + }, + "liability_shift_possible": { + "type": [ + "null", + "boolean" + ] + }, + "liability_shifted": { + "type": [ + "null", + "boolean" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_version": { + "type": [ + "null", + "string" + ] + }, + "xid": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": { + "type": [ + "null", + "string" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "venmo_account_details": { + "type": [ + "null", + "object" + ], + "properties": { + "image_url": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "username": { + "type": [ + "null", + "string" + ] + }, + "venmo_user_id": { + "type": [ + "null", + "string" + ] + } + } + }, + "visa_checkout_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "call_id": { + "type": [ + "null", + "string" + ] + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "voice_referral_number": { + "type": [ + "null", + "integer" + ] + } + } + } + }, + "trial_duration": { + "type": [ + "null", + "integer" + ] + }, + "trial_duration_unit": { + "type": [ + "null", + "string" + ] + }, + "trial_period": { + "type": [ + "null", + "boolean" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "samsung_pay_cards": { + "type": [ + "null", + "array" + ], + "items": { + "$ref": "/shared/cards.json", + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "customer_id": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "default": { + "type": [ + "null", + "boolean" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "expired": { + "type": [ + "null", + "boolean" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "subscriptions": { + "type": [ + "null", + "array" + ], + "items": { + "addOns": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "amount": { + "type": [ + "null", + "number" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "quantity": { + "type": [ + "null", + "integer" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + } + }, + "balance": { + "type": [ + "null", + "number" + ] + }, + "billing_day_of_month": { + "type": [ + "null", + "integer" + ] + }, + "billing_period_end_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "billing_period_start_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "days_past_due": { + "type": [ + "null", + "integer" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "descriptor": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "discounts": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "amount": { + "type": [ + "null", + "number" + ] + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "quantity": { + "type": [ + "null", + "integer" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + } + }, + "failure_count": { + "type": [ + "null", + "integer" + ] + }, + "first_billing_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "merchant_account_id": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "next_bill_amount": { + "type": [ + "null", + "number" + ] + }, + "next_billing_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "next_billing_period_amount": { + "type": [ + "null", + "number" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "paid_through_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "payment_method_token": { + "type": [ + "null", + "string" + ] + }, + "plan_id": { + "type": [ + "null", + "string" + ] + }, + "price": { + "type": [ + "null", + "number" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "status_history": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "string" + ], + "properties": { + "balance": { + "type": [ + "null", + "string" + ] + }, + "price": { + "type": [ + "null", + "string" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "subscription_source": { + "type": [ + "null", + "string" + ] + } + } + } + }, + "transactions": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "acquirer_reference_number": { + "type": [ + "null", + "string" + ] + }, + "additional_processor_response": { + "type": [ + "null", + "string" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "android_pay_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "google_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "is_network_tokenized": { + "type": [ + "null", + "boolean" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "source_card_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_type": { + "type": [ + "null", + "string" + ] + } + } + }, + "apple_pay_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_name": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "authorization_adjustments": { + "type": [ + "null", + "string" + ] + }, + "authorization_expires_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "avs_error_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_postal_code_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_street_address_response_code": { + "type": [ + "null", + "string" + ] + }, + "billing_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha_2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha_3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "channel": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "credit_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "payment_reader_attributes": { + "type": [ + "null", + "object" + ], + "properties": { + "application_cryptogram": { + "type": [ + "null", + "string" + ] + }, + "application_identifier": { + "type": [ + "null", + "string" + ] + }, + "application_interchange_profile": { + "type": [ + "null", + "string" + ] + }, + "application_name": { + "type": [ + "null", + "string" + ] + }, + "application_transaction_counter": { + "type": [ + "null", + "string" + ] + }, + "application_usage_control": { + "type": [ + "null", + "string" + ] + }, + "authorization_mode": { + "type": [ + "null", + "string" + ] + }, + "authorization_response_code": { + "type": [ + "null", + "string" + ] + }, + "card_entry_method": { + "type": [ + "null", + "string" + ] + }, + "card_sequence_number": { + "type": [ + "null", + "string" + ] + }, + "cardholder_verification_method_results": { + "type": [ + "null", + "string" + ] + }, + "cashback_amount": { + "type": [ + "null", + "string" + ] + }, + "cryptogram_information_data": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_default": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_denial": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_online": { + "type": [ + "null", + "string" + ] + }, + "issuer_authentication_data": { + "type": [ + "null", + "string" + ] + }, + "terminal_country_code": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "terminal_transaction_type": { + "type": [ + "null", + "string" + ] + }, + "terminal_verification_result": { + "type": [ + "null", + "string" + ] + }, + "unpredictable_number": { + "type": [ + "null", + "string" + ] + } + } + }, + "unique_number_identifier": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "custom_fields": { + "type": [ + "null", + "string" + ] + }, + "customer_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "fax": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "website": { + "type": [ + "null", + "string" + ] + } + } + }, + "cvv_response_code": { + "type": [ + "null", + "string" + ] + }, + "descriptor": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "disbursement_details": { + "type": [ + "null", + "object" + ], + "properties": { + "disbursement_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "funds_held": { + "type": [ + "null", + "boolean" + ] + }, + "settlement_amount": { + "type": [ + "null", + "number" + ] + }, + "settlement_base_currency_exchange_rate": { + "type": [ + "null", + "string" + ] + }, + "settlement_currency_exchange_rate": { + "type": [ + "null", + "string" + ] + }, + "settlement_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "success": { + "type": [ + "null", + "string" + ] + } + } + }, + "discount_amount": { + "type": [ + "null", + "number" + ] + }, + "escrow_status": { + "type": [ + "null", + "string" + ] + }, + "facilated_details": { + "type": [ + "null", + "object" + ], + "properties": { + "merchant_id": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "payment_method_nonce": { + "type": [ + "null", + "string" + ] + } + } + }, + "facilitator_details": { + "type": [ + "null", + "object" + ], + "properties": { + "oauth_application_client_id": { + "type": [ + "null", + "string" + ] + }, + "oauth_application_name": { + "type": [ + "null", + "string" + ] + }, + "source_payment_method_token": { + "type": [ + "null", + "string" + ] + } + } + }, + "gateway_rejection_reason": { + "type": [ + "null", + "string" + ] + }, + "graphql_id": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "masterpass_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_account_id": { + "type": [ + "null", + "string" + ] + }, + "merchant_address": { + "type": [ + "null", + "object" + ], + "properties": { + "locality": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_identification_number": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "network_response_code": { + "type": [ + "null", + "string" + ] + }, + "network_response_text": { + "type": [ + "null", + "string" + ] + }, + "network_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "order_id": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_type": { + "type": [ + "null", + "string" + ] + }, + "payment_receipt": { + "type": [ + "null", + "object" + ], + "properties": { + "account_balance": { + "type": [ + "null", + "number" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "card_last_4": { + "type": [ + "null", + "string" + ] + }, + "card_present_data": { + "type": [ + "null", + "object" + ], + "properties": { + "application_cryptogram": { + "type": [ + "null", + "string" + ] + }, + "application_identifier": { + "type": [ + "null", + "string" + ] + }, + "application_interchange_profile": { + "type": [ + "null", + "string" + ] + }, + "application_name": { + "type": [ + "null", + "string" + ] + }, + "application_transaction_counter": { + "type": [ + "null", + "string" + ] + }, + "application_usage_control": { + "type": [ + "null", + "string" + ] + }, + "authorization_mode": { + "type": [ + "null", + "string" + ] + }, + "authorization_response_code": { + "type": [ + "null", + "string" + ] + }, + "card_entry_method": { + "type": [ + "null", + "string" + ] + }, + "card_sequence_number": { + "type": [ + "null", + "string" + ] + }, + "cardholder_verification_method_results": { + "type": [ + "null", + "string" + ] + }, + "cashback_amount": { + "type": [ + "null", + "string" + ] + }, + "cryptogram_information_data": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_default": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_denial": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_online": { + "type": [ + "null", + "string" + ] + }, + "issuer_authentication_data": { + "type": [ + "null", + "string" + ] + }, + "terminal_country_code": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_date": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_type": { + "type": [ + "null", + "string" + ] + }, + "termination_verification_result": { + "type": [ + "null", + "string" + ] + }, + "unpredictable_number": { + "type": [ + "null", + "string" + ] + } + } + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "global_id": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "merchant_address": { + "type": [ + "null", + "object" + ], + "properties": { + "locality": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_identification_number": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "pin_verified": { + "type": [ + "null", + "boolean" + ] + }, + "processor_authorization_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_text": { + "type": [ + "null", + "string" + ] + }, + "terminal_identification_number": { + "type": [ + "null", + "string" + ] + }, + "type": { + "type": [ + "null", + "string" + ] + } + } + }, + "paypal_details": { + "type": [ + "null", + "object" + ], + "properties": { + "authorization_id": { + "type": [ + "null", + "string" + ] + }, + "capture_id": { + "type": [ + "null", + "string" + ] + }, + "custom_field": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "implicitly_vaulted_payment_method_global_id": { + "type": [ + "null", + "string" + ] + }, + "implicitly_vaulted_payment_method_token": { + "type": [ + "null", + "string" + ] + }, + "payer_email": { + "type": [ + "null", + "string" + ] + }, + "payer_first_name": { + "type": [ + "null", + "string" + ] + }, + "payer_id": { + "type": [ + "null", + "string" + ] + }, + "payer_last_name": { + "type": [ + "null", + "string" + ] + }, + "payer_phone": { + "type": [ + "null", + "string" + ] + }, + "payer_status": { + "type": [ + "null", + "string" + ] + }, + "payment_id": { + "type": [ + "null", + "string" + ] + }, + "refund_description": { + "type": [ + "null", + "string" + ] + }, + "refund_from_transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "refund_from_transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "refund_id": { + "type": [ + "null", + "string" + ] + }, + "refund_reason": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_currency_code": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_discount_amount": { + "type": [ + "null", + "string" + ] + }, + "select_financing_discount_percentage": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_monthly_payment_amount": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_term": { + "type": [ + "null", + "string" + ] + }, + "seller_protection_status": { + "type": [ + "null", + "string" + ] + }, + "shipping_option_id": { + "type": [ + "null", + "string" + ] + }, + "tax_id": { + "type": [ + "null", + "string" + ] + }, + "tax_id_type": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + } + } + }, + "paypal_here_details": { + "type": [ + "null", + "object" + ], + "properties": { + "authorization_id": { + "type": [ + "null", + "string" + ] + }, + "capture_id": { + "type": [ + "null", + "string" + ] + }, + "invoice_id": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_id": { + "type": [ + "null", + "string" + ] + }, + "payment_type": { + "type": [ + "null", + "string" + ] + }, + "refund_id": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "transaction_initiation_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "transaction_updated_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "pin_verified": { + "type": [ + "null", + "boolean" + ] + }, + "plan_id": { + "type": [ + "null", + "string" + ] + }, + "processor_authorization_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_text": { + "type": [ + "null", + "string" + ] + }, + "processor_response_type": { + "type": [ + "null", + "string" + ] + }, + "processor_settlement_response_text": { + "type": [ + "null", + "string" + ] + }, + "purchase_order_number": { + "type": [ + "null", + "string" + ] + }, + "recurring": { + "type": [ + "null", + "boolean" + ] + }, + "refund_ids": { + "type": [ + "null", + "string" + ] + }, + "refunded_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "response_emv_data": { + "type": [ + "null", + "string" + ] + }, + "retrieval_reference_number": { + "type": [ + "null", + "string" + ] + }, + "risk_data": { + "type": [ + "null", + "object" + ], + "properties": { + "decision": { + "type": [ + "null", + "string" + ] + }, + "decision_reasons": { + "type": [ + "null", + "string" + ] + }, + "device_data_captured": { + "type": [ + "null", + "boolean" + ] + }, + "fraud_service_provider": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "transaction_risk_score": { + "type": [ + "null", + "string" + ] + } + } + }, + "samsung_pay_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "sca_exemption_requested": { + "type": [ + "null", + "string" + ] + }, + "service_fee_amount": { + "type": [ + "null", + "number" + ] + }, + "settlement_batch_id": { + "type": [ + "null", + "string" + ] + }, + "shipping_amount": { + "type": [ + "null", + "number" + ] + }, + "shipping_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "ships_from_postal_code": { + "type": [ + "null", + "string" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "subscription_details": { + "type": [ + "null", + "object" + ], + "properties": { + "billing_period_end_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "billing_period_start_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "subscription_id": { + "type": [ + "null", + "string" + ] + }, + "tax_amount": { + "type": [ + "null", + "number" + ] + }, + "tax_exempt": { + "type": [ + "null", + "boolean" + ] + }, + "terminal_identification_number": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_info": { + "type": [ + "null", + "object" + ], + "properties": { + "cavv": { + "type": [ + "null", + "string" + ] + }, + "ds_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "eci_flag": { + "type": [ + "null", + "string" + ] + }, + "enrolled": { + "type": [ + "null", + "string" + ] + }, + "liability_shift_possible": { + "type": [ + "null", + "boolean" + ] + }, + "liability_shifted": { + "type": [ + "null", + "boolean" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_version": { + "type": [ + "null", + "string" + ] + }, + "xid": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": { + "type": [ + "null", + "string" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "venmo_account_details": { + "type": [ + "null", + "object" + ], + "properties": { + "image_url": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "username": { + "type": [ + "null", + "string" + ] + }, + "venmo_user_id": { + "type": [ + "null", + "string" + ] + } + } + }, + "visa_checkout_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "call_id": { + "type": [ + "null", + "string" + ] + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "voice_referral_number": { + "type": [ + "null", + "integer" + ] + } + } + } + }, + "trial_duration": { + "type": [ + "null", + "integer" + ] + }, + "trial_duration_unit": { + "type": [ + "null", + "string" + ] + }, + "trial_period": { + "type": [ + "null", + "boolean" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "unique_number_identifier": { + "type": [ + "null", + "string" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "venmo_accounts": { + "type": [ + "null", + "array" + ], + "items": { + "created_id": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "customer_id": { + "type": [ + "null", + "string" + ] + }, + "default": { + "type": [ + "null", + "boolean" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "subscriptions": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "username": { + "type": [ + "null", + "string" + ] + }, + "venmo_user_id": { + "type": [ + "null", + "string" + ] + } + } + }, + "visa_checkout_cards": { + "type": [ + "null", + "array" + ], + "items": { + "$ref": "/shared/cards.json", + "call_id": { + "type": [ + "null", + "string" + ] + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "customer_id": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "default": { + "type": [ + "null", + "boolean" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "expired": { + "type": [ + "null", + "boolean" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "subscriptions": { + "type": [ + "null", + "array" + ], + "items": { + "addOns": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "amount": { + "type": [ + "null", + "number" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "quantity": { + "type": [ + "null", + "integer" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + } + }, + "balance": { + "type": [ + "null", + "number" + ] + }, + "billing_day_of_month": { + "type": [ + "null", + "integer" + ] + }, + "billing_period_end_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "billing_period_start_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "days_past_due": { + "type": [ + "null", + "integer" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "descriptor": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "discounts": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "amount": { + "type": [ + "null", + "number" + ] + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "quantity": { + "type": [ + "null", + "integer" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + } + }, + "failure_count": { + "type": [ + "null", + "integer" + ] + }, + "first_billing_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "merchant_account_id": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "next_bill_amount": { + "type": [ + "null", + "number" + ] + }, + "next_billing_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "next_billing_period_amount": { + "type": [ + "null", + "number" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "paid_through_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "payment_method_token": { + "type": [ + "null", + "string" + ] + }, + "plan_id": { + "type": [ + "null", + "string" + ] + }, + "price": { + "type": [ + "null", + "number" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "status_history": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "string" + ], + "properties": { + "balance": { + "type": [ + "null", + "string" + ] + }, + "price": { + "type": [ + "null", + "string" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "subscription_source": { + "type": [ + "null", + "string" + ] + } + } + } + }, + "transactions": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "acquirer_reference_number": { + "type": [ + "null", + "string" + ] + }, + "additional_processor_response": { + "type": [ + "null", + "string" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "android_pay_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "google_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "is_network_tokenized": { + "type": [ + "null", + "boolean" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "source_card_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_type": { + "type": [ + "null", + "string" + ] + } + } + }, + "apple_pay_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_name": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "authorization_adjustments": { + "type": [ + "null", + "string" + ] + }, + "authorization_expires_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "avs_error_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_postal_code_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_street_address_response_code": { + "type": [ + "null", + "string" + ] + }, + "billing_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha_2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha_3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "channel": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "credit_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "payment_reader_attributes": { + "type": [ + "null", + "object" + ], + "properties": { + "application_cryptogram": { + "type": [ + "null", + "string" + ] + }, + "application_identifier": { + "type": [ + "null", + "string" + ] + }, + "application_interchange_profile": { + "type": [ + "null", + "string" + ] + }, + "application_name": { + "type": [ + "null", + "string" + ] + }, + "application_transaction_counter": { + "type": [ + "null", + "string" + ] + }, + "application_usage_control": { + "type": [ + "null", + "string" + ] + }, + "authorization_mode": { + "type": [ + "null", + "string" + ] + }, + "authorization_response_code": { + "type": [ + "null", + "string" + ] + }, + "card_entry_method": { + "type": [ + "null", + "string" + ] + }, + "card_sequence_number": { + "type": [ + "null", + "string" + ] + }, + "cardholder_verification_method_results": { + "type": [ + "null", + "string" + ] + }, + "cashback_amount": { + "type": [ + "null", + "string" + ] + }, + "cryptogram_information_data": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_default": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_denial": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_online": { + "type": [ + "null", + "string" + ] + }, + "issuer_authentication_data": { + "type": [ + "null", + "string" + ] + }, + "terminal_country_code": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "terminal_transaction_type": { + "type": [ + "null", + "string" + ] + }, + "terminal_verification_result": { + "type": [ + "null", + "string" + ] + }, + "unpredictable_number": { + "type": [ + "null", + "string" + ] + } + } + }, + "unique_number_identifier": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "custom_fields": { + "type": [ + "null", + "string" + ] + }, + "customer_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "fax": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "website": { + "type": [ + "null", + "string" + ] + } + } + }, + "cvv_response_code": { + "type": [ + "null", + "string" + ] + }, + "descriptor": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "disbursement_details": { + "type": [ + "null", + "object" + ], + "properties": { + "disbursement_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "funds_held": { + "type": [ + "null", + "boolean" + ] + }, + "settlement_amount": { + "type": [ + "null", + "number" + ] + }, + "settlement_base_currency_exchange_rate": { + "type": [ + "null", + "string" + ] + }, + "settlement_currency_exchange_rate": { + "type": [ + "null", + "string" + ] + }, + "settlement_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "success": { + "type": [ + "null", + "string" + ] + } + } + }, + "discount_amount": { + "type": [ + "null", + "number" + ] + }, + "escrow_status": { + "type": [ + "null", + "string" + ] + }, + "facilated_details": { + "type": [ + "null", + "object" + ], + "properties": { + "merchant_id": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "payment_method_nonce": { + "type": [ + "null", + "string" + ] + } + } + }, + "facilitator_details": { + "type": [ + "null", + "object" + ], + "properties": { + "oauth_application_client_id": { + "type": [ + "null", + "string" + ] + }, + "oauth_application_name": { + "type": [ + "null", + "string" + ] + }, + "source_payment_method_token": { + "type": [ + "null", + "string" + ] + } + } + }, + "gateway_rejection_reason": { + "type": [ + "null", + "string" + ] + }, + "graphql_id": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "masterpass_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_account_id": { + "type": [ + "null", + "string" + ] + }, + "merchant_address": { + "type": [ + "null", + "object" + ], + "properties": { + "locality": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_identification_number": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "network_response_code": { + "type": [ + "null", + "string" + ] + }, + "network_response_text": { + "type": [ + "null", + "string" + ] + }, + "network_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "order_id": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_type": { + "type": [ + "null", + "string" + ] + }, + "payment_receipt": { + "type": [ + "null", + "object" + ], + "properties": { + "account_balance": { + "type": [ + "null", + "number" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "card_last_4": { + "type": [ + "null", + "string" + ] + }, + "card_present_data": { + "type": [ + "null", + "object" + ], + "properties": { + "application_cryptogram": { + "type": [ + "null", + "string" + ] + }, + "application_identifier": { + "type": [ + "null", + "string" + ] + }, + "application_interchange_profile": { + "type": [ + "null", + "string" + ] + }, + "application_name": { + "type": [ + "null", + "string" + ] + }, + "application_transaction_counter": { + "type": [ + "null", + "string" + ] + }, + "application_usage_control": { + "type": [ + "null", + "string" + ] + }, + "authorization_mode": { + "type": [ + "null", + "string" + ] + }, + "authorization_response_code": { + "type": [ + "null", + "string" + ] + }, + "card_entry_method": { + "type": [ + "null", + "string" + ] + }, + "card_sequence_number": { + "type": [ + "null", + "string" + ] + }, + "cardholder_verification_method_results": { + "type": [ + "null", + "string" + ] + }, + "cashback_amount": { + "type": [ + "null", + "string" + ] + }, + "cryptogram_information_data": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_default": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_denial": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_online": { + "type": [ + "null", + "string" + ] + }, + "issuer_authentication_data": { + "type": [ + "null", + "string" + ] + }, + "terminal_country_code": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_date": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_type": { + "type": [ + "null", + "string" + ] + }, + "termination_verification_result": { + "type": [ + "null", + "string" + ] + }, + "unpredictable_number": { + "type": [ + "null", + "string" + ] + } + } + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "global_id": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "merchant_address": { + "type": [ + "null", + "object" + ], + "properties": { + "locality": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_identification_number": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "pin_verified": { + "type": [ + "null", + "boolean" + ] + }, + "processor_authorization_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_text": { + "type": [ + "null", + "string" + ] + }, + "terminal_identification_number": { + "type": [ + "null", + "string" + ] + }, + "type": { + "type": [ + "null", + "string" + ] + } + } + }, + "paypal_details": { + "type": [ + "null", + "object" + ], + "properties": { + "authorization_id": { + "type": [ + "null", + "string" + ] + }, + "capture_id": { + "type": [ + "null", + "string" + ] + }, + "custom_field": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "implicitly_vaulted_payment_method_global_id": { + "type": [ + "null", + "string" + ] + }, + "implicitly_vaulted_payment_method_token": { + "type": [ + "null", + "string" + ] + }, + "payer_email": { + "type": [ + "null", + "string" + ] + }, + "payer_first_name": { + "type": [ + "null", + "string" + ] + }, + "payer_id": { + "type": [ + "null", + "string" + ] + }, + "payer_last_name": { + "type": [ + "null", + "string" + ] + }, + "payer_phone": { + "type": [ + "null", + "string" + ] + }, + "payer_status": { + "type": [ + "null", + "string" + ] + }, + "payment_id": { + "type": [ + "null", + "string" + ] + }, + "refund_description": { + "type": [ + "null", + "string" + ] + }, + "refund_from_transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "refund_from_transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "refund_id": { + "type": [ + "null", + "string" + ] + }, + "refund_reason": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_currency_code": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_discount_amount": { + "type": [ + "null", + "string" + ] + }, + "select_financing_discount_percentage": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_monthly_payment_amount": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_term": { + "type": [ + "null", + "string" + ] + }, + "seller_protection_status": { + "type": [ + "null", + "string" + ] + }, + "shipping_option_id": { + "type": [ + "null", + "string" + ] + }, + "tax_id": { + "type": [ + "null", + "string" + ] + }, + "tax_id_type": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + } + } + }, + "paypal_here_details": { + "type": [ + "null", + "object" + ], + "properties": { + "authorization_id": { + "type": [ + "null", + "string" + ] + }, + "capture_id": { + "type": [ + "null", + "string" + ] + }, + "invoice_id": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_id": { + "type": [ + "null", + "string" + ] + }, + "payment_type": { + "type": [ + "null", + "string" + ] + }, + "refund_id": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "transaction_initiation_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "transaction_updated_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "pin_verified": { + "type": [ + "null", + "boolean" + ] + }, + "plan_id": { + "type": [ + "null", + "string" + ] + }, + "processor_authorization_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_text": { + "type": [ + "null", + "string" + ] + }, + "processor_response_type": { + "type": [ + "null", + "string" + ] + }, + "processor_settlement_response_text": { + "type": [ + "null", + "string" + ] + }, + "purchase_order_number": { + "type": [ + "null", + "string" + ] + }, + "recurring": { + "type": [ + "null", + "boolean" + ] + }, + "refund_ids": { + "type": [ + "null", + "string" + ] + }, + "refunded_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "response_emv_data": { + "type": [ + "null", + "string" + ] + }, + "retrieval_reference_number": { + "type": [ + "null", + "string" + ] + }, + "risk_data": { + "type": [ + "null", + "object" + ], + "properties": { + "decision": { + "type": [ + "null", + "string" + ] + }, + "decision_reasons": { + "type": [ + "null", + "string" + ] + }, + "device_data_captured": { + "type": [ + "null", + "boolean" + ] + }, + "fraud_service_provider": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "transaction_risk_score": { + "type": [ + "null", + "string" + ] + } + } + }, + "samsung_pay_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "sca_exemption_requested": { + "type": [ + "null", + "string" + ] + }, + "service_fee_amount": { + "type": [ + "null", + "number" + ] + }, + "settlement_batch_id": { + "type": [ + "null", + "string" + ] + }, + "shipping_amount": { + "type": [ + "null", + "number" + ] + }, + "shipping_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "ships_from_postal_code": { + "type": [ + "null", + "string" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "subscription_details": { + "type": [ + "null", + "object" + ], + "properties": { + "billing_period_end_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "billing_period_start_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "subscription_id": { + "type": [ + "null", + "string" + ] + }, + "tax_amount": { + "type": [ + "null", + "number" + ] + }, + "tax_exempt": { + "type": [ + "null", + "boolean" + ] + }, + "terminal_identification_number": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_info": { + "type": [ + "null", + "object" + ], + "properties": { + "cavv": { + "type": [ + "null", + "string" + ] + }, + "ds_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "eci_flag": { + "type": [ + "null", + "string" + ] + }, + "enrolled": { + "type": [ + "null", + "string" + ] + }, + "liability_shift_possible": { + "type": [ + "null", + "boolean" + ] + }, + "liability_shifted": { + "type": [ + "null", + "boolean" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_version": { + "type": [ + "null", + "string" + ] + }, + "xid": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": { + "type": [ + "null", + "string" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "venmo_account_details": { + "type": [ + "null", + "object" + ], + "properties": { + "image_url": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "username": { + "type": [ + "null", + "string" + ] + }, + "venmo_user_id": { + "type": [ + "null", + "string" + ] + } + } + }, + "visa_checkout_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "call_id": { + "type": [ + "null", + "string" + ] + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "voice_referral_number": { + "type": [ + "null", + "integer" + ] + } + } + } + }, + "trial_duration": { + "type": [ + "null", + "integer" + ] + }, + "trial_duration_unit": { + "type": [ + "null", + "string" + ] + }, + "trial_period": { + "type": [ + "null", + "boolean" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "unique_number_identifier": { + "type": [ + "null", + "string" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "website": { + "type": [ + "null", + "string" + ] + } + } +} \ No newline at end of file diff --git a/tap_braintree/schemas/discounts.json b/tap_braintree/schemas/discounts.json new file mode 100644 index 0000000..db8948c --- /dev/null +++ b/tap_braintree/schemas/discounts.json @@ -0,0 +1,76 @@ +{ + "type": [ + "null", + "object" + ], + "properties": { + "amount": { + "type": [ + "null", + "number" + ] + }, + "current_billing_cycle": { + "type": [ + "null", + "integer" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "never_expires": { + "type": [ + "null", + "boolean" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "quantity": { + "type": [ + "null", + "integer" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } +} \ No newline at end of file diff --git a/tap_braintree/schemas/plans.json b/tap_braintree/schemas/plans.json new file mode 100644 index 0000000..97e74df --- /dev/null +++ b/tap_braintree/schemas/plans.json @@ -0,0 +1,106 @@ +{ + "type": [ + "null", + "object" + ], + "properties": { + "add_ons": { + "type": [ + "null", + "array" + ], + "items": { + "$ref": "/add_ons.json" + } + }, + "billing_day_of_month": { + "type": [ + "null", + "integer" + ] + }, + "billing_frequency": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "discounts": { + "type": [ + "null", + "array" + ], + "items": { + "$ref": "/discounts.json" + } + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "number_of_billing_cycles": { + "type": [ + "null", + "integer" + ] + }, + "price": { + "type": [ + "null", + "number" + ] + }, + "trial_duration": { + "type": [ + "null", + "integer" + ] + }, + "trial_duration_unit": { + "type": [ + "null", + "string" + ] + }, + "trial_period": { + "type": [ + "null", + "boolean" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } +} \ No newline at end of file diff --git a/tap_braintree/schemas/shared/address_details.json b/tap_braintree/schemas/shared/address_details.json new file mode 100644 index 0000000..2ad9b7c --- /dev/null +++ b/tap_braintree/schemas/shared/address_details.json @@ -0,0 +1,106 @@ +{ + "type": [ + "null", + "string" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "customer_id": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } +} \ No newline at end of file diff --git a/tap_braintree/schemas/shared/cards.json b/tap_braintree/schemas/shared/cards.json new file mode 100644 index 0000000..c69ef4a --- /dev/null +++ b/tap_braintree/schemas/shared/cards.json @@ -0,0 +1,205 @@ +{ + "billing_address": { + "type": [ + "null", + "string" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "customer_id": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } +} \ No newline at end of file diff --git a/tap_braintree/schemas/transactions.json b/tap_braintree/schemas/transactions.json index a629973..83a5fea 100644 --- a/tap_braintree/schemas/transactions.json +++ b/tap_braintree/schemas/transactions.json @@ -1,190 +1,2899 @@ { - "type": "object", + "type": [ + "null", + "object" + ], "properties": { + "acquirer_reference_number": { + "type": [ + "null", + "string" + ] + }, + "add_ons": { + "type": [ + "null", + "array" + ], + "items": { + "$ref": "/add_ons.json" + } + }, + "additional_processor_response": { + "type": [ + "null", + "string" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "android_pay_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "google_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "is_network_tokenized": { + "type": [ + "null", + "boolean" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "source_card_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "virtual_card_type": { + "type": [ + "null", + "string" + ] + } + } + }, + "apple_pay_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_name": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "authorization_adjustments": { + "type": [ + "null", + "string" + ] + }, + "authorization_expires_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "avs_error_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_postal_code_response_code": { + "type": [ + "null", + "string" + ] + }, + "avs_street_address_response_code": { + "type": [ + "null", + "string" + ] + }, + "billing_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha_2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha_3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "channel": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "credit_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "payment_reader_attributes": { + "type": [ + "null", + "object" + ], + "properties": { + "application_cryptogram": { + "type": [ + "null", + "string" + ] + }, + "application_identifier": { + "type": [ + "null", + "string" + ] + }, + "application_interchange_profile": { + "type": [ + "null", + "string" + ] + }, + "application_name": { + "type": [ + "null", + "string" + ] + }, + "application_transaction_counter": { + "type": [ + "null", + "string" + ] + }, + "application_usage_control": { + "type": [ + "null", + "string" + ] + }, + "authorization_mode": { + "type": [ + "null", + "string" + ] + }, + "authorization_response_code": { + "type": [ + "null", + "string" + ] + }, + "card_entry_method": { + "type": [ + "null", + "string" + ] + }, + "card_sequence_number": { + "type": [ + "null", + "string" + ] + }, + "cardholder_verification_method_results": { + "type": [ + "null", + "string" + ] + }, + "cashback_amount": { + "type": [ + "null", + "string" + ] + }, + "cryptogram_information_data": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_default": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_denial": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_online": { + "type": [ + "null", + "string" + ] + }, + "issuer_authentication_data": { + "type": [ + "null", + "string" + ] + }, + "terminal_country_code": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "terminal_transaction_type": { + "type": [ + "null", + "string" + ] + }, + "terminal_verification_result": { + "type": [ + "null", + "string" + ] + }, + "unpredictable_number": { + "type": [ + "null", + "string" + ] + } + } + }, + "unique_number_identifier": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "custom_fields": { + "type": [ + "null", + "string" + ] + }, + "customer_details": { + "type": [ + "null", + "object" + ], + "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "fax": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "website": { + "type": [ + "null", + "string" + ] + } + } + }, + "cvv_response_code": { + "type": [ + "null", + "string" + ] + }, + "descriptor": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "disbursement_details": { + "type": [ + "null", + "object" + ], + "properties": { + "disbursement_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "funds_held": { + "type": [ + "null", + "boolean" + ] + }, + "settlement_amount": { + "type": [ + "null", + "number" + ] + }, + "settlement_base_currency_exchange_rate": { + "type": [ + "null", + "string" + ] + }, + "settlement_currency_exchange_rate": { + "type": [ + "null", + "string" + ] + }, + "settlement_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "success": { + "type": [ + "null", + "string" + ] + } + } + }, + "discount_amount": { + "type": [ + "null", + "number" + ] + }, + "discounts": { + "type": [ + "null", + "array" + ], + "items": { + "$ref": "/discounts.json" + } + }, + "disputes": { + "type": [ + "null", + "array" + ], + "items": { + "amount_disputed": { + "type": [ + "null", + "number" + ] + }, + "amount_won": { + "type": [ + "null", + "number" + ] + }, + "case_number": { + "type": [ + "null", + "string" + ] + }, + "charge_back_protection_level": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "evidence": { + "type": [ + "null", + "object" + ], + "properties": { + "comment": { + "type": [ + "null", + "string" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "sent_to_processor_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "graphQL_id": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "merchant_account_id": { + "type": [ + "null", + "string" + ] + }, + "original_dispute_id": { + "type": [ + "null", + "string" + ] + }, + "paypal_messages": { + "type": [ + "null", + "object" + ], + "properties": { + "message": { + "type": [ + "null", + "string" + ] + }, + "send_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "sender": { + "type": [ + "null", + "string" + ] + } + } + }, + "processor_comments": { + "type": [ + "null", + "string" + ] + }, + "reason": { + "type": [ + "null", + "string" + ] + }, + "reason_code": { + "type": [ + "null", + "string" + ] + }, + "reason_description": { + "type": [ + "null", + "string" + ] + }, + "received_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "reference_number": { + "type": [ + "null", + "string" + ] + }, + "reply_by_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "status_history": { + "type": [ + "null", + "object" + ], + "properties": { + "disbursement_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "effective_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "timestamp": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "transaction": { + "type": [ + "null", + "object" + ], + "properties": { + "amount": { + "type": [ + "null", + "number" + ] + }, + "created_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "order_id": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_subtype": { + "type": [ + "null", + "string" + ] + }, + "purchase_order_number": { + "type": [ + "null", + "string" + ] + } + } + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "escrow_status": { + "type": [ + "null", + "string" + ] + }, + "facilated_details": { + "type": [ + "null", + "object" + ], + "properties": { + "merchant_id": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "payment_method_nonce": { + "type": [ + "null", + "string" + ] + } + } + }, + "facilitator_details": { + "type": [ + "null", + "object" + ], + "properties": { + "oauth_application_client_id": { + "type": [ + "null", + "string" + ] + }, + "oauth_application_name": { + "type": [ + "null", + "string" + ] + }, + "source_payment_method_token": { + "type": [ + "null", + "string" + ] + } + } + }, + "gateway_rejection_reason": { + "type": [ + "null", + "string" + ] + }, + "graphql_id": { + "type": [ + "null", + "string" + ] + }, "id": { - "type": "string" + "type": [ + "null", + "string" + ] + }, + "line_items": { + "type": [ + "null", + "array" + ], + "items": { + "commodity_code": { + "type": [ + "null", + "string" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "discount_amount": { + "type": [ + "null", + "number" + ] + }, + "kind": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "quantity": { + "type": [ + "null", + "number" + ] + }, + "tax_amount": { + "type": [ + "null", + "number" + ] + }, + "total_amount": { + "type": [ + "null", + "number" + ] + }, + "unit_amount": { + "type": [ + "null", + "number" + ] + }, + "unit_of_measure": { + "type": [ + "null", + "number" + ] + }, + "unit_tax_amount": { + "type": [ + "null", + "number" + ] + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "masterpass_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_type": { + "type": [ + "null", + "string" + ] + }, + "source_description": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_account_id": { + "type": [ + "null", + "string" + ] + }, + "merchant_address": { + "type": [ + "null", + "object" + ], + "properties": { + "locality": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_identification_number": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "network_response_code": { + "type": [ + "null", + "string" + ] + }, + "network_response_text": { + "type": [ + "null", + "string" + ] + }, + "network_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "order_id": { + "type": [ + "null", + "string" + ] + }, + "payment_instrument_type": { + "type": [ + "null", + "string" + ] + }, + "payment_receipt": { + "type": [ + "null", + "object" + ], + "properties": { + "account_balance": { + "type": [ + "null", + "number" + ] + }, + "amount": { + "type": [ + "null", + "number" + ] + }, + "card_last_4": { + "type": [ + "null", + "string" + ] + }, + "card_present_data": { + "type": [ + "null", + "object" + ], + "properties": { + "application_cryptogram": { + "type": [ + "null", + "string" + ] + }, + "application_identifier": { + "type": [ + "null", + "string" + ] + }, + "application_interchange_profile": { + "type": [ + "null", + "string" + ] + }, + "application_name": { + "type": [ + "null", + "string" + ] + }, + "application_transaction_counter": { + "type": [ + "null", + "string" + ] + }, + "application_usage_control": { + "type": [ + "null", + "string" + ] + }, + "authorization_mode": { + "type": [ + "null", + "string" + ] + }, + "authorization_response_code": { + "type": [ + "null", + "string" + ] + }, + "card_entry_method": { + "type": [ + "null", + "string" + ] + }, + "card_sequence_number": { + "type": [ + "null", + "string" + ] + }, + "cardholder_verification_method_results": { + "type": [ + "null", + "string" + ] + }, + "cashback_amount": { + "type": [ + "null", + "string" + ] + }, + "cryptogram_information_data": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_default": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_denial": { + "type": [ + "null", + "string" + ] + }, + "issuer_action_code_online": { + "type": [ + "null", + "string" + ] + }, + "issuer_authentication_data": { + "type": [ + "null", + "string" + ] + }, + "terminal_country_code": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_date": { + "type": [ + "null", + "string" + ] + }, + "terminal_transaction_type": { + "type": [ + "null", + "string" + ] + }, + "termination_verification_result": { + "type": [ + "null", + "string" + ] + }, + "unpredictable_number": { + "type": [ + "null", + "string" + ] + } + } + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "global_id": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "merchant_address": { + "type": [ + "null", + "object" + ], + "properties": { + "locality": { + "type": [ + "null", + "string" + ] + }, + "phone": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] + } + } + }, + "merchant_identification_number": { + "type": [ + "null", + "string" + ] + }, + "merchant_name": { + "type": [ + "null", + "string" + ] + }, + "pin_verified": { + "type": [ + "null", + "boolean" + ] + }, + "processor_authorization_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_code": { + "type": [ + "null", + "string" + ] + }, + "processor_response_text": { + "type": [ + "null", + "string" + ] + }, + "terminal_identification_number": { + "type": [ + "null", + "string" + ] + }, + "type": { + "type": [ + "null", + "string" + ] + } + } + }, + "paypal_details": { + "type": [ + "null", + "object" + ], + "properties": { + "authorization_id": { + "type": [ + "null", + "string" + ] + }, + "capture_id": { + "type": [ + "null", + "string" + ] + }, + "custom_field": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "implicitly_vaulted_payment_method_global_id": { + "type": [ + "null", + "string" + ] + }, + "implicitly_vaulted_payment_method_token": { + "type": [ + "null", + "string" + ] + }, + "payer_email": { + "type": [ + "null", + "string" + ] + }, + "payer_first_name": { + "type": [ + "null", + "string" + ] + }, + "payer_id": { + "type": [ + "null", + "string" + ] + }, + "payer_last_name": { + "type": [ + "null", + "string" + ] + }, + "payer_phone": { + "type": [ + "null", + "string" + ] + }, + "payer_status": { + "type": [ + "null", + "string" + ] + }, + "payment_id": { + "type": [ + "null", + "string" + ] + }, + "refund_description": { + "type": [ + "null", + "string" + ] + }, + "refund_from_transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "refund_from_transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "refund_id": { + "type": [ + "null", + "string" + ] + }, + "refund_reason": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_currency_code": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_discount_amount": { + "type": [ + "null", + "string" + ] + }, + "select_financing_discount_percentage": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_monthly_payment_amount": { + "type": [ + "null", + "string" + ] + }, + "selected_financing_term": { + "type": [ + "null", + "string" + ] + }, + "seller_protection_status": { + "type": [ + "null", + "string" + ] + }, + "shipping_option_id": { + "type": [ + "null", + "string" + ] + }, + "tax_id": { + "type": [ + "null", + "string" + ] + }, + "tax_id_type": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + } + } + }, + "paypal_here_details": { + "type": [ + "null", + "object" + ], + "properties": { + "authorization_id": { + "type": [ + "null", + "string" + ] + }, + "capture_id": { + "type": [ + "null", + "string" + ] + }, + "invoice_id": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "payment_id": { + "type": [ + "null", + "string" + ] + }, + "payment_type": { + "type": [ + "null", + "string" + ] + }, + "refund_id": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_amount": { + "type": [ + "null", + "string" + ] + }, + "transaction_fee_currency_iso_code": { + "type": [ + "null", + "string" + ] + }, + "transaction_initiation_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "transaction_updated_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } }, - "created_at": { - "type": "string", - "format": "date-time" + "pin_verified": { + "type": [ + "null", + "boolean" + ] }, - "updated_at": { - "type": "string", - "format": "date-time" + "plan_id": { + "type": [ + "null", + "string" + ] }, - "settlement_batch_id": { - "type": ["null", "string"] + "processor_authorization_code": { + "type": [ + "null", + "string" + ] }, - "status": { - "type": ["null", "string"] + "processor_response_code": { + "type": [ + "null", + "string" + ] }, - "type": { - "type": ["null", "string"] + "processor_response_text": { + "type": [ + "null", + "string" + ] }, - "amount": { - "type": ["null", "number"] + "processor_response_type": { + "type": [ + "null", + "string" + ] }, - "payment_instrument_type": { - "type": ["null", "string"] + "processor_settlement_response_text": { + "type": [ + "null", + "string" + ] }, - "service_fee_amount": { - "type": ["null", "number"] + "purchase_order_number": { + "type": [ + "null", + "string" + ] }, - "order_id": { - "type": ["null", "string"] + "recurring": { + "type": [ + "null", + "boolean" + ] }, - "plan_id": { - "type": ["null", "string"] + "refund_ids": { + "type": [ + "null", + "string" + ] }, - "gateway_rejection_reason": { - "type": ["null", "string"] + "refunded_transaction_id": { + "type": [ + "null", + "string" + ] }, - "processor_authorization_code": { - "type": ["null", "string"] + "response_emv_data": { + "type": [ + "null", + "string" + ] }, - "processor_response_code": { - "type": ["null", "string"] + "retrieval_reference_number": { + "type": [ + "null", + "string" + ] }, - "processor_response_text": { - "type": ["null", "string"] + "risk_data": { + "type": [ + "null", + "object" + ], + "properties": { + "decision": { + "type": [ + "null", + "string" + ] + }, + "decision_reasons": { + "type": [ + "null", + "string" + ] + }, + "device_data_captured": { + "type": [ + "null", + "boolean" + ] + }, + "fraud_service_provider": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "transaction_risk_score": { + "type": [ + "null", + "string" + ] + } + } }, - "recurring": { - "type": ["null", "boolean"] + "samsung_pay_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "source_card_last_4": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + } + } }, - "refunded_transaction_id": { - "type": ["null", "string"] + "sca_exemption_requested": { + "type": [ + "null", + "string" + ] }, - "currency_iso_code": { - "type": ["null", "string"] + "service_fee_amount": { + "type": [ + "null", + "number" + ] }, - "merchant_account_id": { - "type": ["null", "string"] + "settlement_batch_id": { + "type": [ + "null", + "string" + ] }, - "subscription_id": { - "type": ["null", "string"] + "shipping_amount": { + "type": [ + "null", + "number" + ] }, - "customer_details": { - "type": "object", + "shipping_details": { + "type": [ + "null", + "object" + ], "properties": { + "company": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha2": { + "type": [ + "null", + "string" + ] + }, + "country_code_alpha3": { + "type": [ + "null", + "string" + ] + }, + "country_code_numeric": { + "type": [ + "null", + "string" + ] + }, + "country_name": { + "type": [ + "null", + "string" + ] + }, + "extended_address": { + "type": [ + "null", + "string" + ] + }, + "first_name": { + "type": [ + "null", + "string" + ] + }, "id": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] }, - "email": { - "type": ["null", "string"] + "last_name": { + "type": [ + "null", + "string" + ] + }, + "locality": { + "type": [ + "null", + "string" + ] + }, + "postal_code": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "street_address": { + "type": [ + "null", + "string" + ] } } }, - "credit_card_details": { - "type": "object", + "ships_from_postal_code": { + "type": [ + "null", + "string" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "subscription_details": { + "type": [ + "null", + "object" + ], "properties": { - "customer_location": { - "type": ["null", "string"] + "billing_period_end_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" }, - "card_type": { - "type": ["null", "string"] + "billing_period_start_date": { + "type": [ + "null", + "string" + ], + "format": "date-time" } } }, - "subscription_details":{ - "type": "object", + "subscription_id": { + "type": [ + "null", + "string" + ] + }, + "tax_amount": { + "type": [ + "null", + "number" + ] + }, + "tax_exempt": { + "type": [ + "null", + "boolean" + ] + }, + "terminal_identification_number": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_info": { + "type": [ + "null", + "object" + ], "properties": { - "billing_period_start_date": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } + "cavv": { + "type": [ + "null", + "string" ] }, - "billing_period_end_date": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } + "ds_transaction_id": { + "type": [ + "null", + "string" + ] + }, + "eci_flag": { + "type": [ + "null", + "string" + ] + }, + "enrolled": { + "type": [ + "null", + "string" + ] + }, + "liability_shift_possible": { + "type": [ + "null", + "boolean" + ] + }, + "liability_shifted": { + "type": [ + "null", + "boolean" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "three_d_secure_version": { + "type": [ + "null", + "string" + ] + }, + "xid": { + "type": [ + "null", + "string" ] } } }, - "disbursement_details": { - "anyOf": [ - { - "type": "object", - "properties": { - "disbursement_date": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } + "type": { + "type": [ + "null", + "string" + ] + }, + "updated_at": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "venmo_account_details": { + "type": [ + "null", + "object" + ], + "properties": { + "image_url": { + "type": [ + "null", + "string" ] }, - "success": { - "type": ["null", "boolean"] + "source_description": { + "type": [ + "null", + "string" + ] + }, + "token": { + "type": [ + "null", + "string" + ] + }, + "username": { + "type": [ + "null", + "string" + ] + }, + "venmo_user_id": { + "type": [ + "null", + "string" + ] } - } - }, - { - "type": "null" } - ] }, - "paypal_details": { - "anyOf": [ - { - "type": "object", - "properties": { - "authorization_id" : { - "type": ["null", "string"] - }, - "capture_id": { - "type": ["null", "string"] - }, - "payer_email": { - "type": ["null", "string"] - }, - "payer_id": { - "type": ["null", "string"] - }, - "payer_status": { - "type": ["null", "string"] - }, - "payment_id": { - "type": ["null", "string"] - }, - "refund_id": { - "type": ["null", "string"] - }, - "seller_protection_status": { - "type": ["null", "string"] - }, - "tax_id": { - "type": ["null", "string"] - }, - "tax_id_type": { - "type": ["null", "string"] - }, - "transaction_fee_amount": { - "type": ["null", "string"] - }, - "transaction_fee_currency_iso_code": { - "type": ["null", "string"] - } - } + "visa_checkout_card_details": { + "type": [ + "null", + "object" + ], + "properties": { + "call_id": { + "type": [ + "null", + "string" + ] + }, + "card_type": { + "type": [ + "null", + "string" + ] + }, + "cardholder_name": { + "type": [ + "null", + "string" + ] + }, + "customer_location": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.CustomerLocation.International", + "CreditCard.CustomerLocation.US" + ] + }, + "debit": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Debit.Yes", + "CreditCard.Debit.No", + "CreditCard.Debit.Unknown" + ] + }, + "expiration_date": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "last_4": { + "type": [ + "null", + "string" + ] + }, + "masked_number": { + "type": [ + "null", + "string" + ] + }, + "bin": { + "type": [ + "null", + "string" + ] + }, + "commercial": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Commercial.Yes", + "CreditCard.Commercial.No", + "CreditCard.Commercial.Unknown" + ] + }, + "country_of_issuance": { + "type": [ + "null", + "string" + ] + }, + "durbin_regulated": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.DurbinRegulated.Yes", + "CreditCard.DurbinRegulated.No", + "CreditCard.DurbinRegulated.Unknown" + ] + }, + "expiration_month": { + "type": [ + "null", + "string" + ] + }, + "expiration_year": { + "type": [ + "null", + "string" + ] + }, + "healthcare": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.HealthCare.Yes", + "CreditCard.HealthCare.No", + "CreditCard.HealthCare.Unknown" + ] + }, + "issuing_bank": { + "type": [ + "null", + "string" + ] + }, + "payroll": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Payroll.Yes", + "CreditCard.Payroll.No", + "CreditCard.Payroll.Unknown" + ] + }, + "prepaid": { + "type": [ + "null", + "string" + ], + "enum": [ + "CreditCard.Prepaid.Yes", + "CreditCard.Prepaid.No", + "CreditCard.Prepaid.Unknown" + ] + }, + "product_id": { + "type": [ + "null", + "string" + ] }, - { - "type": "null" + "token": { + "type": [ + "null", + "string" + ] } + } + }, + "voice_referral_number": { + "type": [ + "null", + "integer" ] } } -} +} \ No newline at end of file diff --git a/tap_braintree/streams.py b/tap_braintree/streams.py new file mode 100644 index 0000000..7c04c73 --- /dev/null +++ b/tap_braintree/streams.py @@ -0,0 +1,288 @@ +import pytz +import singer +import braintree +from singer import utils +from datetime import datetime, timedelta +from .transform import transform_row + +TRAILING_DAYS = timedelta(days=30) +DEFAULT_TIMESTAMP = "1970-01-01T00:00:00Z" +LOGGER = singer.get_logger() + +class Stream: + name = None + replication_method = None + replication_keys = None + key_properties = None + parent_stream = None + + # To write schema in output + def write_schema(self, schema, stream_name, sync_streams , selected_streams): + """ + To write schema in output + """ + try: + # Write_schema for the stream if it is selected in catalog + if stream_name in selected_streams and stream_name in sync_streams: + singer.write_schema(stream_name, schema, self.key_properties) + except OSError as err: + LOGGER.error('OS Error writing schema for: {}'.format(stream_name)) + raise err + + def to_utc(self, dt): + """ + Set UTC offset for Python datetime object + """ + return dt.replace(tzinfo=pytz.UTC) + + def write_bookmark(self, state, stream, value): + """ + To write bookmark in sync mode + """ + + if 'bookmarks' not in state: + state['bookmarks'] = {} + if stream not in state['bookmarks']: + state['bookmarks'][stream] = {} + + state['bookmarks'][stream] = value + singer.write_state(state) + + def daterange(self, start_date, end_date): + """ + Generator function that produces an iterable list of days between the two + dates start_date and end_date as a tuple pair of datetimes. + + Note: + All times are set to 0:00. Designed to be used in date query where query + logic would be record_date >= 2019-01-01 0:00 and record_date < 2019-01-02 0:00 + + Args: + start_date (datetime): start of period + end_date (datetime): end of period + + Yields: + tuple: daily period + * datetime: day within range + * datetime: day within range + 1 day + + """ + + # set to start of day + start_date = self.to_utc( + datetime.combine( + start_date.date(), + datetime.min.time() # set to the 0:00 on the day of the start date + ) + ) + end_date = self.to_utc(end_date + timedelta(1)) + + for n in range(int((end_date - start_date).days)): + yield start_date + timedelta(n), start_date + timedelta(n + 1) + +class IncrementSyncWithoutWindow(Stream): + sdk_call = None + key_properties = ["id"] + replication_keys = "updated_at" + replication_method = "INCREMENTAL" + + def sync(self, gateway, config, schema, state, selected_streams): + """ + Sync function for incremental stream without window logic + """ + + data = self.sdk_call(gateway) + time_extracted = utils.now() + latest_start_date = utils.strptime_to_utc(state.get("bookmarks", {}).get(self.name, {}).get(self.replication_keys, config['start_date']) ) + max_updated_at = latest_updated_at = latest_start_date + + period_start = latest_start_date - TRAILING_DAYS + + LOGGER.info("{}: Syncing from {}".format(self.name, period_start)) + + LOGGER.info("{}: latest_start_date from {}".format(self.name, latest_start_date)) + + row_written_count = 0 + + for row in data: + # Ensure updated_at consistency + if not getattr(row, 'updated_at'): + row.updated_at = row.created_at + + if self.to_utc(row.updated_at) >= latest_start_date: + transformed = transform_row(row, schema) + latest_updated_at = self.to_utc(row.updated_at) + max_updated_at = max(max_updated_at, latest_updated_at) + singer.write_record(self.name, transformed, time_extracted=time_extracted) + row_written_count += 1 + + LOGGER.info("{}: Written {} records from {} - {}".format(self.name, row_written_count, latest_start_date, time_extracted)) + + LOGGER.info("{}: Complete. Last updated record: {}".format(self.name, latest_updated_at)) + + state_value = { + self.replication_keys: utils.strftime(max_updated_at) + } + self.write_bookmark(state, self.name, state_value) + + return row_written_count + +class IncrementSyncWithWindow(Stream): + sdk_call = None + key_properties = ["id"] + replication_keys = "created_at" + replication_method = "INCREMENTAL" + + def sync(self, gateway, config, schema, state, selected_streams): + """ + Sync function for incremental stream with window logic + """ + has_updated_at = self.name in {"customers", "transactions"} + has_disbursement = self.name in {"transactions"} + + latest_start_date = utils.strptime_to_utc(state.get("bookmarks", {}).get(self.name, {}).get(self.replication_keys, config['start_date']) ) + + period_start = latest_start_date - TRAILING_DAYS + + period_end = utils.now() + + LOGGER.info("{}: Syncing from {}".format(self.name, period_start)) + LOGGER.info("{}: latest_start_date from {}".format(self.name, latest_start_date)) + + if has_updated_at: + latest_updated_at = utils.strptime_to_utc(state.get("bookmarks", {}).get(self.name, {}).get('latest_updated_at', DEFAULT_TIMESTAMP)) + run_maximum_updated_at = latest_updated_at + LOGGER.info("{}: latest_updated_at from {}".format(self.name, latest_updated_at)) + + if has_disbursement: + latest_disbursement_date = utils.strptime_to_utc(state.get("bookmarks", {}).get(self.name, {}).get('latest_disbursment_date', DEFAULT_TIMESTAMP)) + run_maximum_disbursement_date = latest_disbursement_date + LOGGER.info("{}: disbursement_date from {}".format(self.name, latest_disbursement_date)) + + # increment through each day (20k results max from api) + for start, end in self.daterange(period_start, period_end): + end = min(end, period_end) + + data = self.sdk_call(gateway, start, end) + time_extracted = utils.now() + + row_written_count = 0 + row_skipped_count = 0 + + for row in data: + # Ensure updated_at consistency + if has_updated_at and not getattr(row, 'updated_at'): + row.updated_at = row.created_at + + transformed = transform_row(row, schema) + + if has_disbursement: + # if disbursement is successful, get disbursement date + # set disbursement datetime to min if not found + if row.disbursement_details is None: + disbursement_date = self.to_utc(datetime.min) + else: + if row.disbursement_details.disbursement_date is None: + row.disbursement_details.disbursement_date = datetime.min + disbursement_date = self.to_utc(datetime.combine(row.disbursement_details.disbursement_date, datetime.min.time())) + + # Is this more recent than our past stored value of update_at? + # Is this more recent than our past stored value of disbursement_date? + # Use >= for updated_at due to non monotonic updated_at values + # Use > for disbursement_date - confirming all records disbursed + # at the same time + # Update our high water mark for updated_at and disbursement_date + # in this run + + if not (has_updated_at and has_disbursement) and self.name in selected_streams: + singer.write_record(self.name, transformed, time_extracted=time_extracted) + row_written_count += 1 + else: + updated_at = self.to_utc(row.updated_at) + + if has_disbursement and ((updated_at >= latest_updated_at) or (disbursement_date >= latest_disbursement_date)): + + run_maximum_updated_at = max(updated_at, run_maximum_updated_at) + run_maximum_disbursement_date = max(disbursement_date, run_maximum_disbursement_date) + + if self.name in selected_streams: + singer.write_record(self.name, transformed, time_extracted=time_extracted) + row_written_count += 1 + + elif has_updated_at and (updated_at >= latest_updated_at): + run_maximum_updated_at = max(updated_at, run_maximum_updated_at) + if self.name in selected_streams: + singer.write_record(self.name, transformed, time_extracted=time_extracted) + row_written_count += 1 + + else: + row_skipped_count += 1 + + LOGGER.info("{}: Written {} records from {} - {}".format(self.name, row_written_count, start, end)) + + LOGGER.info("{}: Skipped {} records from {} - {}".format(self.name, row_skipped_count, start, end)) + + state_value = { + self.replication_keys: utils.strftime(end) + } + + if has_updated_at: + LOGGER.info("{}: Complete. Last updated record: {}".format(self.name, run_maximum_updated_at)) + latest_updated_at = run_maximum_updated_at + state_value["latest_updated_at"] = utils.strftime(latest_updated_at) + + if has_disbursement: + LOGGER.info("{}: Complete. Last disbursement date: {}".format(self.name, run_maximum_disbursement_date)) + latest_disbursement_date = run_maximum_disbursement_date + state_value["latest_disbursement_date"] = utils.strftime(latest_disbursement_date) + + self.write_bookmark(state, self.name, state_value) + + return row_written_count + +class FullTableSync(Stream): + sdk_call = None + key_properties = ["id"] + + def sync(self, gateway, config, schema, state, selected_streams): + """ + Sync function for full_table stream + """ + data = self.sdk_call(gateway) + time_extracted = utils.now() + row_written_count = 0 + + for row in data: + transformed = transform_row(row, schema) + singer.write_record(self.name, transformed, time_extracted=time_extracted) + row_written_count += 1 + + return row_written_count + +class AddOn(IncrementSyncWithoutWindow): + name = "add_ons" + sdk_call = lambda self, gateway: gateway.add_on.all() + +class Customer(IncrementSyncWithWindow): + name = "customers" + sdk_call = lambda self, gateway, start, end: gateway.customer.search(braintree.CustomerSearch.created_at.between(start, end)) + +class Discount(IncrementSyncWithoutWindow): + name = "discounts" + sdk_call = lambda self, gateway: gateway.discount.all() + +class Plan(IncrementSyncWithoutWindow): + name = "plans" + sdk_call = lambda self, gateway: gateway.plan.all() + +class Transaction(IncrementSyncWithWindow): + name = "transactions" + sdk_call = lambda self, gateway, start, end: gateway.transaction.search(braintree.TransactionSearch.created_at.between(start, end)) + +STREAMS = { + "add_ons": AddOn, + "customers": Customer, + "discounts": Discount, + "plans": Plan, + "transactions": Transaction +} diff --git a/tap_braintree/sync.py b/tap_braintree/sync.py new file mode 100644 index 0000000..ed11ed9 --- /dev/null +++ b/tap_braintree/sync.py @@ -0,0 +1,91 @@ +import singer +from tap_braintree.streams import STREAMS + +LOGGER = singer.get_logger() + +# Currently syncing sets the stream currently being delivered in the state. +# If the integration is interrupted, this state property is used to identify +# the starting point to continue from. +# Reference: https://github.com/singer-io/singer-python/blob/master/singer/bookmarks.py#L41-L46 +def update_currently_syncing(state, stream_name): + """ + Update currently_syncing value in state for given stream + """ + + if (stream_name is None) and ('currently_syncing' in state): + del state['currently_syncing'] + else: + singer.set_currently_syncing(state, stream_name) + singer.write_state(state) + +def get_selected_streams(catalog, state): + """ + Return list of all selected fields from catalog + """ + + # Return list of all the selected streams in catalog + selected_streams = [] + for stream in catalog.get_selected_streams(state): + selected_streams.append(stream.stream) + LOGGER.info('selected_streams: {}'.format(selected_streams)) + return selected_streams + + +def sync(gateway, config, catalog, state): + """ + Run sync function for all the selected stream + """ + + LOGGER.info("Starting Sync") + + selected_streams = get_selected_streams(catalog, state) + if not selected_streams or selected_streams == []: + return + + # Get the streams to sync (based on dependencies) + sync_streams = [] + + # Loop thru all streams + for stream_name, stream_class in STREAMS.items(): + # LOGGER.info('START Syncing: %s', stream_name) + if stream_name in selected_streams: + + # If stream has a parent_stream, then it is a child stream + parent_stream = stream_class.parent_stream + + LOGGER.info('stream: {}, parent: {}'.format(stream_name, parent_stream)) + + if stream_name not in sync_streams: + sync_streams.append(stream_name) + + if parent_stream and parent_stream not in sync_streams: + sync_streams.append(parent_stream) + + LOGGER.info('Sync Streams: {}'.format(sync_streams)) + + # Loop through selected_streams + for stream_name in STREAMS: + if stream_name not in sync_streams or STREAMS[stream_name].parent_stream != None: + LOGGER.info("{}: Skipping - not selected".format(stream_name)) + continue + + stream = catalog.get_stream(stream_name) + schema = stream.schema.to_dict() + stream_obj = STREAMS[stream_name]() + LOGGER.info('START Syncing: {}'.format(stream_name)) + stream_obj.write_schema(schema, stream_name, sync_streams, selected_streams) + update_currently_syncing(state, stream_name) + + total_records = stream_obj.sync( + gateway = gateway, + config = config, + schema = schema, + state = state, + selected_streams = selected_streams + ) + + update_currently_syncing(state, None) + LOGGER.info('FINISHED Syncing: {}, total_records: {}'.format(stream_name, total_records)) + + update_currently_syncing(state, None) + LOGGER.info("Finished sync") diff --git a/tap_braintree/transform.py b/tap_braintree/transform.py index 6935d62..310bd4e 100644 --- a/tap_braintree/transform.py +++ b/tap_braintree/transform.py @@ -66,10 +66,10 @@ def _transform_field(value, field_schema): if "anyOf" in field_schema: return _anyOf(value, field_schema["anyOf"]) - if field_schema["type"] == "array": + if "array" in field_schema["type"]: return _array(value, field_schema["items"]) - if field_schema["type"] == "object": + if "object" in field_schema["type"]: return _object(value, field_schema["properties"]) # Ordering of isinstance datetime checks matters diff --git a/tests/unittests/test_discover.py b/tests/unittests/test_discover.py new file mode 100644 index 0000000..5da2d5b --- /dev/null +++ b/tests/unittests/test_discover.py @@ -0,0 +1,13 @@ +import unittest +from tap_braintree import discover + +class TestDiscover(unittest.TestCase): + + def test_discover(self): + ''' + This test is used to verify that proper catalog is returned by discover function + ''' + + return_catalog = discover() + self.assertTrue(type(return_catalog), dict) + \ No newline at end of file diff --git a/tests/unittests/test_exception_handling.py b/tests/unittests/test_exception_handling.py new file mode 100644 index 0000000..da05a5a --- /dev/null +++ b/tests/unittests/test_exception_handling.py @@ -0,0 +1,37 @@ +import unittest +from unittest import mock +from parameterized import parameterized +from braintree.exceptions.upgrade_required_error import UpgradeRequiredError +from braintree.exceptions.too_many_requests_error import TooManyRequestsError +from braintree.exceptions.server_error import ServerError +from braintree.exceptions.service_unavailable_error import ServiceUnavailableError +from braintree.exceptions.gateway_timeout_error import GatewayTimeoutError +from tap_braintree.streams import AddOn + + + +class TestBraintreeAPIResponseException(unittest.TestCase): + '''Test case to verify if errors are getting raised properly or not''' + + @parameterized.expand([ + ['too_many_requests_error', TooManyRequestsError], #Error with status code 429 + ['server_error', ServerError], #Error with status code 500 + ['service_unavailable_error', ServiceUnavailableError], #Error with status code 503 + ['gateway_timeout_error', GatewayTimeoutError] #Error with status code 504 + ]) + @mock.patch("tap_braintree.streams.AddOn.sdk_call") + def test_raised_error(self, name, actual, mocked_sdk_call): + '''Test function to test whether correct errors are getting raised or not''' + + mocked_sdk_call.side_effect = actual + stream_obj = AddOn() + with self.assertRaises(actual) as e: + stream_obj.sync( + gateway = "test", + config = {"start_date": ""}, + schema = {}, + state = {}, + selected_streams = ["add_ons"] + ) + + self.assertEqual(type(e.exception), actual) diff --git a/tests/unittests/test_load_ref_schema.py b/tests/unittests/test_load_ref_schema.py new file mode 100644 index 0000000..4f50458 --- /dev/null +++ b/tests/unittests/test_load_ref_schema.py @@ -0,0 +1,13 @@ +import unittest +from tap_braintree import schema + +class TestClass(unittest.TestCase): + '''Test class for verifying working of load_shared_schema_refs function''' + + def test_load_shared_schema_refs(self): + ''' + This test function verifies that schemas for references are resolved properly + ''' + + return_schema_refs = schema.load_shared_schema_refs() + self.assertTrue(type(return_schema_refs), dict) diff --git a/tests/unittests/test_main.py b/tests/unittests/test_main.py new file mode 100644 index 0000000..44eb97c --- /dev/null +++ b/tests/unittests/test_main.py @@ -0,0 +1,45 @@ +import unittest +from unittest import mock +from parameterized import parameterized +from braintree.exceptions.authentication_error import AuthenticationError +from tap_braintree import main + +class Mocked(): + config = {"merchant_id": "test", "public_key": "test", "private_key": "test"} + state = {} + catalog = {} + + def __init__(self, *args): + pass + + +@mock.patch("tap_braintree.json.dump") +@mock.patch("tap_braintree.braintree.BraintreeGateway") +@mock.patch("tap_braintree.utils.parse_args" ) +class TestMain(unittest.TestCase): + @parameterized.expand([ + ["Main function for sync mode", Mocked, None], + ["Main function for authentication error in sync", AuthenticationError, None] + ]) + @mock.patch("tap_braintree._sync") + def test_main_for_sync(self, test_name, test_value, expected_value, mocked_sync, mocked_parse_args, mocked_gateway, mocked_json): + """ + Test to verify that main function execute properly when sync mode execute + """ + Mocked.discover = False + mocked_parse_args.return_value = Mocked + mocked_sync.side_effect = test_value + main() + call_count = mocked_sync.call_count + self.assertEqual(call_count, 1) + + @mock.patch("tap_braintree.discover") + def test_main_for_discover(self, mocked_discover, mocked_parse_args, mocked_gateway, mocked_json): + """ + Test to verify that main function execute properly when discover mode execute + """ + Mocked.discover = True + mocked_parse_args.return_value = Mocked + main() + call_count = mocked_discover.call_count + self.assertEqual(call_count, 1) diff --git a/tests/unittests/test_schema.py b/tests/unittests/test_schema.py new file mode 100644 index 0000000..992245e --- /dev/null +++ b/tests/unittests/test_schema.py @@ -0,0 +1,24 @@ +import unittest +from tap_braintree import schema +from unittest import mock + +class TestSchema(unittest.TestCase): + + def test_get_schemas(self): + ''' + This test function verifies that proper schemas and metadata are returned by the get_schemas function + ''' + + return_schemas, return_metadata = schema.get_schemas() + self.assertTrue(type(return_schemas), dict) + self.assertTrue(type(return_metadata), dict) + + + @mock.patch("os.path.join") + def test_get_abs_path(self, mock_os_path): + ''' + This test function is used to verify that we get proper path for given file + ''' + + mock_os_path.return_value = "abc/xyz" + assert schema.get_abs_path("ab") == "abc/xyz" #here "ab" is the name of the file \ No newline at end of file diff --git a/tests/unittests/test_sync.py b/tests/unittests/test_sync.py new file mode 100644 index 0000000..99be824 --- /dev/null +++ b/tests/unittests/test_sync.py @@ -0,0 +1,124 @@ +import pytz +import unittest +from datetime import datetime +from unittest.mock import patch, call +from tap_braintree import _sync +from tap_braintree.streams import MerchantAccount, AddOn, SettlementBatchSummary, Transaction, Subscription +from parameterized import parameterized + +class Mocked: + + def __init__(self, stream=None, created_at=None, updated_at=None, disbursement_date=None): + self.stream = stream + self.schema = Mocked + self.created_at = created_at + self.updated_at = updated_at + self.disbursement_details = self if disbursement_date else None + self.disbursement_date = disbursement_date + + def get_selected_streams(state): + return (Mocked(i) for i in ["add_ons", "customers"]) + + def get_stream(stream_name): + return Mocked() + + def to_dict(): + return {} + +class TestSyncMode(unittest.TestCase): + @patch("tap_braintree.LOGGER.info") + @patch("tap_braintree.streams.FullTableSync.sync", return_value=10) + @patch("tap_braintree.streams.SyncWithWindow.sync", return_value=10) + @patch("tap_braintree.streams.SyncWithoutWindow.sync", return_value=10) + def test_sync(self, mocked_sync_without_window, mocked_sync_with_window, mocked_sync_full_table, mocked_LOGGER): + """ + Test to verify that sync function run properly based on its logger calling + """ + + _sync("test_gateway", {}, Mocked, {}) + expected = [ + call('Starting Sync'), + call("selected_streams: ['add_ons', 'customers']"), + call('stream: add_ons, parent: None'), + call('stream: customers, parent: None'), + call("Sync Streams: ['add_ons', 'customers']"), + call('START Syncing: add_ons'), + call('FINISHED Syncing: add_ons, total_records: 10'), + call('START Syncing: customers'), + call('FINISHED Syncing: customers, total_records: 10'), + call('discounts: Skipping - not selected'), + call('plans: Skipping - not selected'), + call('transactions: Skipping - not selected'), + call('Finished sync') + ] + self.assertEqual(mocked_LOGGER.mock_calls, expected, "Logger calls are not as expected") + + # @patch("tap_braintree.streams.MerchantAccount.sdk_call", return_value=["test", "test", "test"]) + # @patch("tap_braintree.streams.transform_row", return_value={'currency_iso_code': 'USD', 'default': True, 'id': 'cds', 'status': 'active'}) + # def test_full_table_sync(self, mocked_transform_row, mocked_sdk_call): + # """ + # Test to verify that syncing return expected number of records for FULL_TABLE streams + # """ + + # stream_obj = MerchantAccount() + # record_counts = stream_obj.sync( + # gateway = "test", + # config = {"start_date": ""}, + # schema = {}, + # state = {}, + # selected_streams = ["merchant_accounts"] + # ) + + # self.assertEqual(mocked_transform_row.call_count, 3, "Not getting expected number of calls") + # self.assertEqual(record_counts, 3, "Not getting expected number of records") + + @parameterized.expand([ + ['with_state', {"bookmarks": {"add_ons": {"updated_at": "2022-06-28T00:00:00.000000Z"}}}, None], + ['without_state', {}, None], + ]) + @patch("tap_braintree.streams.AddOn.sdk_call", return_value=[Mocked(None, datetime(2022, 5, 29, 11, 46, 12)), Mocked(None, datetime(2022, 6, 29, 11, 46, 12)), Mocked(None, datetime(2022, 6, 29, 11, 46, 12), datetime(2022, 6, 29, 11, 46, 12))]) + @patch("tap_braintree.streams.transform_row", return_value="test_data") + def test_sync_without_window(self, name, test_data, expected_data, mocked_transform_row, mocked_sdk_call): + """ + Test to verify that syncing without date window return expected number of records for INCREMENTAL streams + """ + + stream_obj = AddOn() + record_counts = stream_obj.sync( + gateway = "test", + config = {"start_date": "2022-06-25T00:00:00Z"}, + schema = {}, + state = test_data, + selected_streams = ["add_ons"] + ) + + self.assertEqual(record_counts, 2, "Not getting expected number of the records") + self.assertEqual(mocked_transform_row.call_count, 2, "Not getting expected number of calls") + + @patch("tap_braintree.streams.utils.now", return_value=datetime(2022,6,30,00,00,00).replace(tzinfo=pytz.UTC)) + @patch("tap_braintree.streams.transform_row", return_value="test_data") + @patch("tap_braintree.streams.Transaction.sdk_call", return_value=[Mocked(None, datetime(2022, 5, 29, 11, 46, 12)), Mocked(None, datetime(2022, 6, 29, 11, 46, 12)), Mocked(None, datetime(2022, 6, 29, 11, 46, 12), datetime(2022, 6, 29, 11, 46, 12), datetime(2022, 6, 29, 11, 46, 12))]) + def test_sync_with_window_for_transactions(self, mocked_sdk_call, mocked_transform_row, mocked_utils_now): + """ + Test to verify that syncing with date window return expected number of records for INCREMENTAL streams + """ + + stream_obj = Transaction() + record_counts = stream_obj.sync( + gateway = "test", + config = {"start_date": "2022-06-25T00:00:00Z"}, + schema = {}, + state = { + "bookmarks": { + "transactions": { + "latest_updated_at": "2022-06-18T07:13:21.000000Z", + "latest_disbursement_date": "2022-06-18T00:00:00.000000Z", + "created_at": "2022-05-28T11:58:25.385256Z" + } + }, + }, + selected_streams = ["transactions"] + ) + + self.assertEqual(record_counts, 2, "Not getting expected number of the records") + self.assertEqual(mocked_transform_row.call_count, 192, "Not getting expected number of calls") diff --git a/tests/unittests/test_transform.py b/tests/unittests/test_transform.py new file mode 100644 index 0000000..61db4f7 --- /dev/null +++ b/tests/unittests/test_transform.py @@ -0,0 +1,79 @@ +import unittest +import datetime +from parameterized import parameterized +from tap_braintree.transform import InvalidData +from tap_braintree import transform + + +class Mocked: + '''Mocked class to set values for testing''' + def __init__(self): + self.string_data = "test" + self.int_data = 123 + self.num_data = 12.3 + self.bool_data = True + self.dt_data = datetime.datetime(2022, 1, 1, 00, 00, 00) + +class TestTransform(unittest.TestCase): + '''Test cases to verify proper working of transform functions''' + + def test_transform_row(self): + '''Test case to verify proper transformation of row''' + + schema = {'properties':{},'type': ['null', 'string']} + return_row = transform.transform_row(Mocked(), schema) + self.assertTrue(type(return_row), dict) + + + def test_invalid_data_error(self): + '''Test case to verify only valid data gets transformed ''' + + type_schema = ['string'] + with self.assertRaises(InvalidData) as e: + transform._type_transform({}, type_schema) + self.assertEqual(str(e.exception), "{} doesn\'t match any of ['string']") + + + + def test_object(self): + '''Test case to verify proper transformation of object type data''' + + properties_schema = {'properties':{},'type': ['null', 'string']} + return_data = transform._object(Mocked(), properties_schema) + self.assertTrue(type(return_data), dict) + + + def test_type_transform(self): + '''Test case to verify proper transformation of data of different datatypes''' + + # Verify proper transformation of data of type string + obj = Mocked() + return_type = transform._type_transform(obj.string_data, 'string') + self.assertTrue(type(return_type), str) + + # Verify proper transformation of data of type integer + return_type = transform._type_transform(obj.int_data, 'integer') + self.assertTrue(type(return_type), int) + + # Verify proper transformation of data of type float i.e. number + return_type = transform._type_transform(obj.num_data, 'number') + self.assertTrue(type(return_type), float) + + # Verify proper transformation of data of type boolean + return_type = transform._type_transform(obj.bool_data, 'boolean') + self.assertTrue(type(return_type), bool) + + + @parameterized.expand([ + ['array_type',[[Mocked()],{"items": {"type":["null", "string"]}, "type": ["null", "array"]}],list], + ['object_type',[Mocked(), {'properties':{},'type': ['null', 'object']}],dict], + ]) + def test_transform_field(self, name, actual, expected): + '''Test case to verify proper transformation of fields within type object and array''' + + resp = transform._transform_field(actual[0], actual[1]) + self.assertEqual(type(resp),expected) + + + + \ No newline at end of file