Sha256: 58005e9801c504f2d9641f99cc3db6e19f8ef98f402121060f364c8809e2c93a

Contents?: true

Size: 1.03 KB

Versions: 6

Compression:

Stored size: 1.03 KB

Contents

require 'voucherify'

voucherify = Voucherify.new({
                                "applicationId" => "c70a6f00-cf91-4756-9df5-47628850002b",
                                "clientSecretKey" => "3266b9f8-e246-4f79-bdf0-833929b1380c"
                            })

new_customer = voucherify.create_customer({
                                              name: "John Doe",
                                              email: "john@email.com",
                                              description: "Sample description about customer",
                                              metadata: {
                                                  lang: "en"
                                              }
                                          })

print(new_customer)

customer = voucherify.get_customer(new_customer["id"])

print(customer)

customer[:description] = "Sample description of customer with updates"

updated_customer = voucherify.update_customer(customer)

print(updated_customer)

voucherify.delete_customer(updated_customer["id"])

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
voucherify-0.8.2 examples/customer.rb
voucherify-0.8.0 examples/customer.rb
voucherify-0.7.0 examples/customer.rb
voucherify-0.6.0 examples/customer.rb
voucherify-0.5.1 examples/customer.rb
voucherify-0.5.0 examples/customer.rb