Module: Frontgo::Customer

Included in:
Client
Defined in:
lib/frontgo/customer.rb

Overview

Instance Method Summary collapse

Instance Method Details

#get_customer_details_by_uuid(uuid) ⇒ Object

Examples:

Get customer details

client.get_customer_details_by_uuid("CSRT1511414842")


8
9
10
# File 'lib/frontgo/customer.rb', line 8

def get_customer_details_by_uuid(uuid)
  get "connect/customers/details/#{uuid}"
end

#update_corporate_customer(uuid, params) ⇒ Object

Examples:

Update corporate customer

client.update_corporate_customer("CSRT1511414842", {
  name: "Acme Corporation",
  organizationId: "192933933",
  countryCode: "+47",
  msisdn: "46567468",
  email: "[email protected]",
  preferredLanguage: "en",
  addresses: {
    billing: {
      street: "Luramyrveien 65",
      zip: "4313",
      city: "Sandnes",
      country: "NO"
    },
    shipping: {
      street: "Sjøhusbakken 42",
      zip: "4313",
      city: "Oslo",
      country: "NO"
    }
  },
  additionalContact: {
    "0": {
      name: "John Doe",
      email: "[email protected]",
      designation: "CEO",
      countryCode: "+47",
      msisdn: "12345678",
      note: "Primary contact"
    }
  }
})


72
73
74
# File 'lib/frontgo/customer.rb', line 72

def update_corporate_customer(uuid, params)
  put "connect/customers/update/corporate/#{uuid}", params
end

#update_private_customer(uuid, params) ⇒ Object

Examples:

Update private customer

client.update_private_customer("CSRT1511414842", {
  name: "Kari Nordmann",
  countryCode: "+47",
  msisdn: "46567468",
  email: "[email protected]",
  preferredLanguage: "en",
  personalNumber: "12345678901",
  addresses: {
    billing: {
      street: "Luramyrveien 65",
      zip: "4313",
      city: "Sandnes",
      country: "NO"
    },
    shipping: {
      street: "Sjøhusbakken 42",
      zip: "4313",
      city: "Stavanger",
      country: "NO"
    }
  }
})


35
36
37
# File 'lib/frontgo/customer.rb', line 35

def update_private_customer(uuid, params)
  put "connect/customers/update/private/#{uuid}", params
end