perka 1.0.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +7 -0
- data/Gemfile +12 -0
- data/LICENSE.txt +201 -0
- data/README.md +17 -0
- data/Rakefile +70 -0
- data/lib/perka/client_api.rb +260 -0
- data/lib/perka/model/abstract_reward_confirmation.rb +15 -0
- data/lib/perka/model/abstract_user.rb +37 -0
- data/lib/perka/model/api_description.rb +22 -0
- data/lib/perka/model/base_entity_global.rb +27 -0
- data/lib/perka/model/bounce_back_target.rb +33 -0
- data/lib/perka/model/canned_email_outbound_message.rb +14 -0
- data/lib/perka/model/clerk.rb +41 -0
- data/lib/perka/model/composite_target.rb +22 -0
- data/lib/perka/model/console_message.rb +16 -0
- data/lib/perka/model/coupon.rb +52 -0
- data/lib/perka/model/coupon_campaign.rb +26 -0
- data/lib/perka/model/coupon_redemption.rb +26 -0
- data/lib/perka/model/coupon_target.rb +30 -0
- data/lib/perka/model/coupon_visibility.rb +29 -0
- data/lib/perka/model/customer.rb +41 -0
- data/lib/perka/model/customer_device.rb +23 -0
- data/lib/perka/model/endpoint_description.rb +49 -0
- data/lib/perka/model/entity_annotation.rb +33 -0
- data/lib/perka/model/entity_description.rb +31 -0
- data/lib/perka/model/everybody_target.rb +15 -0
- data/lib/perka/model/feedback_item.rb +28 -0
- data/lib/perka/model/first_visit_target.rb +16 -0
- data/lib/perka/model/idle_customer_target.rb +20 -0
- data/lib/perka/model/integrator_user.rb +16 -0
- data/lib/perka/model/internal_user.rb +15 -0
- data/lib/perka/model/like_to_unlock_target.rb +14 -0
- data/lib/perka/model/list_target.rb +17 -0
- data/lib/perka/model/merchant.rb +42 -0
- data/lib/perka/model/merchant_capability.rb +16 -0
- data/lib/perka/model/merchant_device.rb +29 -0
- data/lib/perka/model/merchant_location.rb +46 -0
- data/lib/perka/model/merchant_user.rb +29 -0
- data/lib/perka/model/nobody_target.rb +15 -0
- data/lib/perka/model/outbound_message.rb +14 -0
- data/lib/perka/model/parameter_description.rb +29 -0
- data/lib/perka/model/participation_target.rb +34 -0
- data/lib/perka/model/physical_redemption_target.rb +17 -0
- data/lib/perka/model/points_activity.rb +34 -0
- data/lib/perka/model/points_activity_confirmation.rb +24 -0
- data/lib/perka/model/points_catalog_item.rb +41 -0
- data/lib/perka/model/program.rb +35 -0
- data/lib/perka/model/program_tier.rb +30 -0
- data/lib/perka/model/program_type.rb +27 -0
- data/lib/perka/model/property.rb +65 -0
- data/lib/perka/model/punch_reward_confirmation.rb +43 -0
- data/lib/perka/model/push_message.rb +17 -0
- data/lib/perka/model/redemption_coupon_confirmation.rb +26 -0
- data/lib/perka/model/redemption_reward_confirmation.rb +26 -0
- data/lib/perka/model/reward.rb +38 -0
- data/lib/perka/model/reward_advancement.rb +30 -0
- data/lib/perka/model/reward_grant.rb +37 -0
- data/lib/perka/model/sms_message.rb +15 -0
- data/lib/perka/model/sms_outbound_message.rb +14 -0
- data/lib/perka/model/social_list_target.rb +14 -0
- data/lib/perka/model/social_service_subscription.rb +26 -0
- data/lib/perka/model/street_address.rb +27 -0
- data/lib/perka/model/tier_target.rb +24 -0
- data/lib/perka/model/tier_traversal.rb +30 -0
- data/lib/perka/model/tier_traversal_confirmation.rb +28 -0
- data/lib/perka/model/type.rb +33 -0
- data/lib/perka/model/user_credentials.rb +28 -0
- data/lib/perka/model/visit.rb +59 -0
- data/lib/perka/model/visit_confirmation.rb +47 -0
- data/lib/perka/model/weather_target.rb +27 -0
- data/lib/perka/model/yield_management_target.rb +23 -0
- data/lib/perka/perka_api.rb +89 -0
- data/lib/perka/version.rb +3 -0
- data/lib/perka.rb +6 -0
- data/lib/perka_fast.rb +68 -0
- data/perka.gemspec +20 -0
- data/spec/api_integrator_spec.rb +210 -0
- data/spec/model_spec.rb +24 -0
- metadata +178 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/yield_management_target'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
class BounceBackTarget < YieldManagementTarget
|
9
|
+
|
10
|
+
PROPERTY_NAMES = [
|
11
|
+
|
12
|
+
# Returns the minutes-of-day that the bounceback window closes.
|
13
|
+
:local_open_end_at,
|
14
|
+
|
15
|
+
# Returns the minutes-of-day that the bounceback window opens.
|
16
|
+
:local_open_start_at,
|
17
|
+
|
18
|
+
# Returns the maximum number of times a customer may redeem the bounce-back
|
19
|
+
# coupon within any given bounce-back window. This property is separate
|
20
|
+
# from the maximum number of times the associated Coupon may be redeemed.
|
21
|
+
# The default value is <code>1</code>. A value of <code>0</code> allows
|
22
|
+
# unlimited use of the bounce-back offer.
|
23
|
+
:redemption_count_per_window,
|
24
|
+
|
25
|
+
# Returns the minutes-of-day that the bounceback window closes.
|
26
|
+
:redemption_days
|
27
|
+
]
|
28
|
+
attr_accessor *PROPERTY_NAMES
|
29
|
+
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/abstract_user'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
# A Clerk represents either an employee identity or a role identity used by
|
9
|
+
# the validator app. <p> Two distinct classes of Clerks exist: <ul> <li>Named
|
10
|
+
# clerks, representing a user authorized to perform actions at zero or more
|
11
|
+
# locations <li>Anonymous clerks, representing an access role for a single location
|
12
|
+
# </ul> A named clerk must downgrade to an anonymous clerk in order to perform
|
13
|
+
# validations at a single location. This avoids the need to store any particular
|
14
|
+
# user's credentials in the validator app.
|
15
|
+
class Clerk < AbstractUser
|
16
|
+
|
17
|
+
PROPERTY_NAMES = [
|
18
|
+
:email,
|
19
|
+
:unconfirmed_email,
|
20
|
+
|
21
|
+
# The <entityReference payloadName='merchant'> Merchant</entityReference>
|
22
|
+
# that owns the clerk account.
|
23
|
+
:merchant,
|
24
|
+
|
25
|
+
# The locations that the clerk is allowed to interact with.
|
26
|
+
:merchant_locations,
|
27
|
+
|
28
|
+
# Indicates if the Clerk is an anonymous role account used by a validator
|
29
|
+
# application at a single location.
|
30
|
+
:anonymous
|
31
|
+
]
|
32
|
+
attr_accessor *PROPERTY_NAMES
|
33
|
+
|
34
|
+
require 'perka/model/merchant'
|
35
|
+
TYPE_MAP = {
|
36
|
+
:merchant => Perka::Model::Merchant
|
37
|
+
}
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/coupon_target'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
# A <entityReference payloadName='couponTarget'> CouponTarget</entityReference>
|
9
|
+
# that acts as a union or intersection of other <entityReference payloadName='couponTarget'>
|
10
|
+
# CouponTarget</entityReference> objects.
|
11
|
+
class CompositeTarget < CouponTarget
|
12
|
+
|
13
|
+
PROPERTY_NAMES = [
|
14
|
+
:operation,
|
15
|
+
:children
|
16
|
+
]
|
17
|
+
attr_accessor *PROPERTY_NAMES
|
18
|
+
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/outbound_message'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
# Test implementation of OutboundMessage for text messages intended for console
|
9
|
+
# output for debugging.
|
10
|
+
class ConsoleMessage < OutboundMessage
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/base_entity_global'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
# Represents a specific offer extended to a merchant's customer base.
|
9
|
+
class Coupon < BaseEntityGlobal
|
10
|
+
|
11
|
+
PROPERTY_NAMES = [
|
12
|
+
:summary,
|
13
|
+
:redemption_limit,
|
14
|
+
|
15
|
+
# The CouponVisibilites that control where and to whom the Coupon is available.
|
16
|
+
:coupon_visibilities,
|
17
|
+
|
18
|
+
# The parent CouponCampaign that aggregates related Coupons.
|
19
|
+
:coupon_campaign,
|
20
|
+
|
21
|
+
# The short perk icon name (e.g. <code>unicorn</code>).
|
22
|
+
:image_name,
|
23
|
+
|
24
|
+
# This property doesn't represent a single instance in time (i.e. a number
|
25
|
+
# of milliseconds past the epoch in UTC time). Instead, this value must
|
26
|
+
# be interpreted using the user's local timezone. For example, if the exact
|
27
|
+
# instant stored in this value is noon UTC time on such-and-such a day,
|
28
|
+
# this value should be interpreted to mean noon on that same date in the
|
29
|
+
# user's local timezone.
|
30
|
+
:local_begins_at,
|
31
|
+
|
32
|
+
# See note on #getLocalBeginsAt() on how to interpret this.
|
33
|
+
:local_ends_at,
|
34
|
+
:notify_minutes_before,
|
35
|
+
:perk_id,
|
36
|
+
:url,
|
37
|
+
|
38
|
+
# Indicates whether or not the Coupon will be actively pushed to customer
|
39
|
+
# devices, or if it is a passive coupon.
|
40
|
+
:push_enabled,
|
41
|
+
:title
|
42
|
+
]
|
43
|
+
attr_accessor *PROPERTY_NAMES
|
44
|
+
|
45
|
+
require 'perka/model/coupon_campaign'
|
46
|
+
TYPE_MAP = {
|
47
|
+
:coupon_campaign => Perka::Model::CouponCampaign
|
48
|
+
}
|
49
|
+
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/base_entity_global'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
# A CouponCampaign defines a relationship between what a merchant thinks of
|
9
|
+
# as a coupon and the collection of Coupon objects that implement the behavior.
|
10
|
+
# In general, a campaign consists of Coupons that span a non-contiguous set
|
11
|
+
# of time ranges, but that are otherwise identical in configuration.
|
12
|
+
class CouponCampaign < BaseEntityGlobal
|
13
|
+
|
14
|
+
PROPERTY_NAMES = [
|
15
|
+
:coupons,
|
16
|
+
|
17
|
+
# Retains the original <code>RRULE</code> string used to construct the campaign.
|
18
|
+
:rrule,
|
19
|
+
:title
|
20
|
+
]
|
21
|
+
attr_accessor *PROPERTY_NAMES
|
22
|
+
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/base_entity_global'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
class CouponRedemption < BaseEntityGlobal
|
9
|
+
|
10
|
+
PROPERTY_NAMES = [
|
11
|
+
:coupon,
|
12
|
+
:visit,
|
13
|
+
:redeemed_at
|
14
|
+
]
|
15
|
+
attr_accessor *PROPERTY_NAMES
|
16
|
+
|
17
|
+
require 'perka/model/visit'
|
18
|
+
require 'perka/model/coupon'
|
19
|
+
TYPE_MAP = {
|
20
|
+
:visit => Perka::Model::Visit,
|
21
|
+
:coupon => Perka::Model::Coupon
|
22
|
+
}
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/base_entity_global'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
# The CustomerClass hierarchy defines memberships rules that have been defined
|
9
|
+
# by a Merchant.
|
10
|
+
class CouponTarget < BaseEntityGlobal
|
11
|
+
|
12
|
+
PROPERTY_NAMES = [
|
13
|
+
:merchant,
|
14
|
+
|
15
|
+
# An optional child-to-parent relationship that allows behaviors to be aggregated
|
16
|
+
# together.
|
17
|
+
:parent
|
18
|
+
]
|
19
|
+
attr_accessor *PROPERTY_NAMES
|
20
|
+
|
21
|
+
require 'perka/model/merchant'
|
22
|
+
require 'perka/model/composite_target'
|
23
|
+
TYPE_MAP = {
|
24
|
+
:merchant => Perka::Model::Merchant,
|
25
|
+
:parent => Perka::Model::CompositeTarget
|
26
|
+
}
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/base_entity_global'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
class CouponVisibility < BaseEntityGlobal
|
9
|
+
|
10
|
+
PROPERTY_NAMES = [
|
11
|
+
:merchant_location,
|
12
|
+
:coupon,
|
13
|
+
:coupon_target,
|
14
|
+
:coupon_target_type
|
15
|
+
]
|
16
|
+
attr_accessor *PROPERTY_NAMES
|
17
|
+
|
18
|
+
require 'perka/model/merchant_location'
|
19
|
+
require 'perka/model/coupon_target'
|
20
|
+
require 'perka/model/coupon'
|
21
|
+
TYPE_MAP = {
|
22
|
+
:merchant_location => Perka::Model::MerchantLocation,
|
23
|
+
:coupon_target => Perka::Model::CouponTarget,
|
24
|
+
:coupon => Perka::Model::Coupon
|
25
|
+
}
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/abstract_user'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
# A Customer is someone who visits a <entityReference payloadName='merchantLocation'>
|
9
|
+
# MerchantLocation</entityReference> and engages in a retail transaction.
|
10
|
+
class Customer < AbstractUser
|
11
|
+
|
12
|
+
PROPERTY_NAMES = [
|
13
|
+
:avatar_url,
|
14
|
+
:customer_devices,
|
15
|
+
|
16
|
+
# The integrator that created the Customer object.
|
17
|
+
:managed_by,
|
18
|
+
:rewards,
|
19
|
+
:sms_messages,
|
20
|
+
:social_service_subscriptions,
|
21
|
+
:tier_traversals,
|
22
|
+
|
23
|
+
# You probably want #getLastVisit().
|
24
|
+
:visits,
|
25
|
+
:waiting_merchant_location,
|
26
|
+
:waiting_name_since,
|
27
|
+
:specials_messaging_enabled,
|
28
|
+
:email
|
29
|
+
]
|
30
|
+
attr_accessor *PROPERTY_NAMES
|
31
|
+
|
32
|
+
require 'perka/model/merchant_location'
|
33
|
+
require 'perka/model/integrator_user'
|
34
|
+
TYPE_MAP = {
|
35
|
+
:waiting_merchant_location => Perka::Model::MerchantLocation,
|
36
|
+
:managed_by => Perka::Model::IntegratorUser
|
37
|
+
}
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/base_entity_global'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
# Represents a smartphone device associated with a specific Customer.
|
9
|
+
class CustomerDevice < BaseEntityGlobal
|
10
|
+
|
11
|
+
PROPERTY_NAMES = [
|
12
|
+
:customer
|
13
|
+
]
|
14
|
+
attr_accessor *PROPERTY_NAMES
|
15
|
+
|
16
|
+
require 'perka/model/customer'
|
17
|
+
TYPE_MAP = {
|
18
|
+
:customer => Perka::Model::Customer
|
19
|
+
}
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'flatpack_core'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
# Describes an <code>HTTP</code> request endpoint.
|
9
|
+
class EndpointDescription < Flatpack::Core::BaseHasUuid
|
10
|
+
|
11
|
+
PROPERTY_NAMES = [
|
12
|
+
|
13
|
+
# Describes any query parameters for the endpoint.
|
14
|
+
:query_parameters,
|
15
|
+
|
16
|
+
# The expected entity type for the request. Generally, the <code>HTTP POST</code>
|
17
|
+
# body.
|
18
|
+
:entity,
|
19
|
+
|
20
|
+
# Describes any parameters embedded in #getPath().
|
21
|
+
:path_parameters,
|
22
|
+
:doc_string,
|
23
|
+
|
24
|
+
# Return the role names that are allowed to access the endpoint. A <code>null</code>
|
25
|
+
# value means that all roles are allowed, while a zero-length value means
|
26
|
+
# that no roles are allowed.
|
27
|
+
:role_names,
|
28
|
+
|
29
|
+
# The HTTP method used to access the endpoint.
|
30
|
+
:method,
|
31
|
+
|
32
|
+
# The expected contents for the HTTP response.
|
33
|
+
:return_type,
|
34
|
+
|
35
|
+
# The path used to access the endpoint.
|
36
|
+
:path
|
37
|
+
]
|
38
|
+
attr_accessor *PROPERTY_NAMES
|
39
|
+
|
40
|
+
require 'perka/model/type'
|
41
|
+
require 'perka/model/type'
|
42
|
+
TYPE_MAP = {
|
43
|
+
:entity => Perka::Model::Type,
|
44
|
+
:return_type => Perka::Model::Type
|
45
|
+
}
|
46
|
+
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/base_entity_global'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
# Allows integrators to associate an arbitrary JSON object with a persistent
|
9
|
+
# entity. Any instance of an EntityAnnotation is specific to a particular IntegratorUser
|
10
|
+
# and multiple integrators may annotate the same entity. <p> When a request
|
11
|
+
# is made to the API server by an integrator or by any other user that is managed
|
12
|
+
# by an integrator, any EntityAnnotations associated with objects in the returned
|
13
|
+
# payload will be included as extra data.
|
14
|
+
class EntityAnnotation < BaseEntityGlobal
|
15
|
+
|
16
|
+
PROPERTY_NAMES = [
|
17
|
+
|
18
|
+
# The target entity for the annotation.
|
19
|
+
:entity,
|
20
|
+
|
21
|
+
# The custom data which may be any JSON value.
|
22
|
+
:annotation
|
23
|
+
]
|
24
|
+
attr_accessor *PROPERTY_NAMES
|
25
|
+
|
26
|
+
require 'perka/model/base_entity_global'
|
27
|
+
TYPE_MAP = {
|
28
|
+
:entity => Perka::Model::BaseEntityGlobal
|
29
|
+
}
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'flatpack_core'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
# A description of an entity type.
|
9
|
+
class EntityDescription < Flatpack::Core::BaseHasUuid
|
10
|
+
|
11
|
+
PROPERTY_NAMES = [
|
12
|
+
|
13
|
+
# Indicates that instance of the the type may be persisted by the server.
|
14
|
+
# This hint can be used to reduce payload sizes by transmitting only mutated
|
15
|
+
# properties.
|
16
|
+
:persistent,
|
17
|
+
:doc_string,
|
18
|
+
:supertype,
|
19
|
+
:properties,
|
20
|
+
:type_name
|
21
|
+
]
|
22
|
+
attr_accessor *PROPERTY_NAMES
|
23
|
+
|
24
|
+
require 'perka/model/entity_description'
|
25
|
+
TYPE_MAP = {
|
26
|
+
:supertype => Perka::Model::EntityDescription
|
27
|
+
}
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/base_entity_global'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
# Feedback left by a Customer after a Visit has been completed.
|
9
|
+
class FeedbackItem < BaseEntityGlobal
|
10
|
+
|
11
|
+
PROPERTY_NAMES = [
|
12
|
+
:visit,
|
13
|
+
:rating,
|
14
|
+
:customer_name,
|
15
|
+
:feedback,
|
16
|
+
:signed,
|
17
|
+
:visit_uuid
|
18
|
+
]
|
19
|
+
attr_accessor *PROPERTY_NAMES
|
20
|
+
|
21
|
+
require 'perka/model/visit'
|
22
|
+
TYPE_MAP = {
|
23
|
+
:visit => Perka::Model::Visit
|
24
|
+
}
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/coupon_target'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
# A Customer is a member of the class if they have no confirmed visits to any
|
9
|
+
# of the Merchant's locations.
|
10
|
+
class FirstVisitTarget < CouponTarget
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/list_target'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
# The customers whose last confirmed visit was more than some number of days
|
9
|
+
# ago.
|
10
|
+
class IdleCustomerTarget < ListTarget
|
11
|
+
|
12
|
+
PROPERTY_NAMES = [
|
13
|
+
:idle_days
|
14
|
+
]
|
15
|
+
attr_accessor *PROPERTY_NAMES
|
16
|
+
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/abstract_user'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
# An identity that represents an external API consumer. The IntegratorUser is
|
9
|
+
# mainly used to obtain access tokens to act as other users.
|
10
|
+
class IntegratorUser < AbstractUser
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/coupon_target'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
# A base type for customer classes that restrict a CouponVisibility to a list
|
9
|
+
# of Customers. This base type is appropriate for memberships that do not change
|
10
|
+
# on a frequent basis or ones that are computationally-intensive to compute.
|
11
|
+
class ListTarget < CouponTarget
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Generated File - DO NOT EDIT
|
2
|
+
|
3
|
+
require 'perka/model/base_entity_global'
|
4
|
+
|
5
|
+
module Perka
|
6
|
+
module Model
|
7
|
+
|
8
|
+
# Merchants operate the retail locations that offer a Perka loyalty program.
|
9
|
+
class Merchant < BaseEntityGlobal
|
10
|
+
|
11
|
+
PROPERTY_NAMES = [
|
12
|
+
:last_action_at,
|
13
|
+
:program_tiers,
|
14
|
+
:visit_expiration_minutes,
|
15
|
+
:merchant_locations,
|
16
|
+
:loyalty_type,
|
17
|
+
|
18
|
+
# A list of Clerks, which are limited to acting on specific locations.
|
19
|
+
:clerks,
|
20
|
+
:merchant_state,
|
21
|
+
:headline,
|
22
|
+
:merchant_capabilities,
|
23
|
+
:merchant_users,
|
24
|
+
:notes,
|
25
|
+
|
26
|
+
# Points-based merchants will define one or more catalog items for which
|
27
|
+
# points can be redeemed.
|
28
|
+
:points_catalog_items,
|
29
|
+
|
30
|
+
# Points-based merchants may offer a signup bonus to new customers for signing
|
31
|
+
# up.
|
32
|
+
:points_signup_bonus,
|
33
|
+
:terms,
|
34
|
+
:sales_demo,
|
35
|
+
:name
|
36
|
+
]
|
37
|
+
attr_accessor *PROPERTY_NAMES
|
38
|
+
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|