Class: Seam::Clients::Customers

Inherits:
Object
  • Object
show all
Defined in:
lib/seam/routes/clients/customers.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:, defaults:) ⇒ Customers

Returns a new instance of Customers.



6
7
8
9
# File 'lib/seam/routes/clients/customers.rb', line 6

def initialize(client:, defaults:)
  @client = client
  @defaults = defaults
end

Instance Method Details

#create_portal(customization_profile_id: nil, features: nil, is_embedded: nil, landing_page: nil, locale: nil, customer_data: nil) ⇒ Object



11
12
13
14
15
# File 'lib/seam/routes/clients/customers.rb', line 11

def create_portal(customization_profile_id: nil, features: nil, is_embedded: nil, landing_page: nil, locale: nil, customer_data: nil)
  res = @client.post("/customers/create_portal", {customization_profile_id: customization_profile_id, features: features, is_embedded: is_embedded, landing_page: landing_page, locale: locale, customer_data: customer_data}.compact)

  Seam::Resources::MagicLink.load_from_response(res.body["magic_link"])
end

#delete_data(access_grant_keys: nil, booking_keys: nil, building_keys: nil, common_area_keys: nil, customer_keys: nil, facility_keys: nil, guest_keys: nil, listing_keys: nil, property_keys: nil, property_listing_keys: nil, reservation_keys: nil, resident_keys: nil, room_keys: nil, space_keys: nil, staff_member_keys: nil, tenant_keys: nil, unit_keys: nil, user_identity_keys: nil, user_keys: nil) ⇒ Object



17
18
19
20
21
# File 'lib/seam/routes/clients/customers.rb', line 17

def delete_data(access_grant_keys: nil, booking_keys: nil, building_keys: nil, common_area_keys: nil, customer_keys: nil, facility_keys: nil, guest_keys: nil, listing_keys: nil, property_keys: nil, property_listing_keys: nil, reservation_keys: nil, resident_keys: nil, room_keys: nil, space_keys: nil, staff_member_keys: nil, tenant_keys: nil, unit_keys: nil, user_identity_keys: nil, user_keys: nil)
  @client.post("/customers/delete_data", {access_grant_keys: access_grant_keys, booking_keys: booking_keys, building_keys: building_keys, common_area_keys: common_area_keys, customer_keys: customer_keys, facility_keys: facility_keys, guest_keys: guest_keys, listing_keys: listing_keys, property_keys: property_keys, property_listing_keys: property_listing_keys, reservation_keys: reservation_keys, resident_keys: resident_keys, room_keys: room_keys, space_keys: space_keys, staff_member_keys: staff_member_keys, tenant_keys: tenant_keys, unit_keys: unit_keys, user_identity_keys: user_identity_keys, user_keys: user_keys}.compact)

  nil
end

#push_data(customer_key:, access_grants: nil, bookings: nil, buildings: nil, common_areas: nil, facilities: nil, guests: nil, listings: nil, properties: nil, property_listings: nil, reservations: nil, residents: nil, rooms: nil, sites: nil, spaces: nil, staff_members: nil, tenants: nil, units: nil, user_identities: nil, users: nil) ⇒ Object



23
24
25
26
27
# File 'lib/seam/routes/clients/customers.rb', line 23

def push_data(customer_key:, access_grants: nil, bookings: nil, buildings: nil, common_areas: nil, facilities: nil, guests: nil, listings: nil, properties: nil, property_listings: nil, reservations: nil, residents: nil, rooms: nil, sites: nil, spaces: nil, staff_members: nil, tenants: nil, units: nil, user_identities: nil, users: nil)
  @client.post("/customers/push_data", {customer_key: customer_key, access_grants: access_grants, bookings: bookings, buildings: buildings, common_areas: common_areas, facilities: facilities, guests: guests, listings: listings, properties: properties, property_listings: property_listings, reservations: reservations, residents: residents, rooms: rooms, sites: sites, spaces: spaces, staff_members: staff_members, tenants: tenants, units: units, user_identities: user_identities, users: users}.compact)

  nil
end