Sha256: 130f36a6155e41f44fcdf58e05e1e804295958e7198fb68e8e7bae8001140795
Contents?: true
Size: 1.01 KB
Versions: 1
Compression:
Stored size: 1.01 KB
Contents
require_relative 'utils.rb' require 'VoucherifySdk' def create_customer(customers_api_instance) begin # Create Customer created_customer = customers_api_instance.create_customer({ customers_create_request_body: VoucherifySdk::CustomersCreateRequestBody.new({ source_id: generate_random_string(), name: "John Doe", address: VoucherifySdk::CustomerBaseAddress.new({ country: "US", city: "New York", line_1: "5th Avenue", line_2: "1/2", postal_code: "11-111" }) }) }) return created_customer rescue VoucherifySdk::ApiError => e return nil end end def delete_customer_permanently(customers_api_instance, customer_id) begin # Delete Customer result = customers_api_instance.customer_permanently_deletion(customer_id) return result rescue VoucherifySdk::ApiError => e return nil end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
voucherify-5.0.0 | __tests__/lib/customers.rb |