leal 0.0.14 → 0.0.16
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.
- checksums.yaml +4 -4
- data/.fern/metadata.json +2 -2
- data/lib/leal/cards/types/create_cards_request_card.rb +14 -0
- data/lib/leal/cards/types/create_cards_request_card_apple_pass_style.rb +14 -0
- data/lib/leal/cards/types/create_cards_request_card_google_logo_style.rb +14 -0
- data/lib/leal/cards/types/create_cards_request_card_qr_style.rb +14 -0
- data/lib/leal/cards/types/create_cards_response.rb +16 -0
- data/lib/leal/cards/types/create_cards_response_google_wallet.rb +15 -0
- data/lib/leal/cards/types/get_cards_response.rb +16 -0
- data/lib/leal/cards/types/get_cards_response_google_wallet.rb +15 -0
- data/lib/leal/cards/types/list_cards_response_item.rb +16 -0
- data/lib/leal/cards/types/list_cards_response_item_google_wallet.rb +15 -0
- data/lib/leal/cards/types/update_cards_request_card.rb +14 -0
- data/lib/leal/cards/types/update_cards_request_card_apple_pass_style.rb +14 -0
- data/lib/leal/cards/types/update_cards_request_card_google_logo_style.rb +14 -0
- data/lib/leal/cards/types/update_cards_request_card_qr_style.rb +14 -0
- data/lib/leal/cards/types/update_cards_response.rb +16 -0
- data/lib/leal/cards/types/update_cards_response_google_wallet.rb +15 -0
- data/lib/leal/client.rb +1 -1
- data/lib/leal/customer_cards/client.rb +4 -2
- data/lib/leal/customer_cards/types/get_customer_cards_response.rb +6 -0
- data/lib/leal/customer_cards/types/get_customer_cards_response_referred_by.rb +19 -0
- data/lib/leal/customer_cards/types/list_customer_cards_response_item.rb +2 -0
- data/lib/leal/customer_cards/types/stamp_customer_cards_response.rb +6 -0
- data/lib/leal/customer_cards/types/stamp_customer_cards_response_referred_by.rb +19 -0
- data/lib/leal/customers/client.rb +3 -1
- data/lib/leal/customers/types/create_customers_request.rb +2 -0
- data/lib/leal/version.rb +1 -1
- data/lib/leal/webhook_subscriptions/client.rb +1 -1
- data/lib/leal.rb +12 -0
- data/reference.md +17 -5
- metadata +14 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ab248518f3c556c6ac1aafedc457af484853dfe8a2db9fb2432fb50a7b89111f
|
|
4
|
+
data.tar.gz: 7b0f88ddedbe2a1121032e8205cc67f75b0f40ac7792a0246582dabb35d65502
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 71a5b90219299a2a78bdf50e69777aff998f166c9feff39f207e214a9555808ffe1f20039125983b1ca9aee1bb3d4cf1a8525b4de6aab603e511e65657b8864f
|
|
7
|
+
data.tar.gz: dc8861f2f04a7cc0a3c0e1802b6090fb93a9530d36a41766fa83246380f715dfa7dc5c3e255d354e3492b8d3c6bbe38cc810cafea706dac28f4f037e00a707bd
|
data/.fern/metadata.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"cliVersion": "5.102.0",
|
|
3
3
|
"generatorName": "fernapi/fern-ruby-sdk",
|
|
4
4
|
"generatorVersion": "1.23.2",
|
|
5
|
-
"originGitCommit": "
|
|
5
|
+
"originGitCommit": "c03884d025c65aea35e127adc0c37730010aac3f",
|
|
6
6
|
"originGitCommitIsDirty": false,
|
|
7
7
|
"invokedBy": "ci",
|
|
8
8
|
"ciProvider": "github",
|
|
9
|
-
"sdkVersion": "0.0.
|
|
9
|
+
"sdkVersion": "0.0.16"
|
|
10
10
|
}
|
|
@@ -4,18 +4,32 @@ module Leal
|
|
|
4
4
|
module Cards
|
|
5
5
|
module Types
|
|
6
6
|
class CreateCardsRequestCard < Internal::Types::Model
|
|
7
|
+
field :apple_pass_style, -> { Leal::Cards::Types::CreateCardsRequestCardApplePassStyle }, optional: true, nullable: false
|
|
8
|
+
|
|
7
9
|
field :auxiliary_fields, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
8
10
|
|
|
9
11
|
field :card_color, -> { String }, optional: true, nullable: false
|
|
10
12
|
|
|
11
13
|
field :expires_at, -> { String }, optional: true, nullable: false
|
|
12
14
|
|
|
15
|
+
field :featured_actions, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
16
|
+
|
|
17
|
+
field :google_logo_style, -> { Leal::Cards::Types::CreateCardsRequestCardGoogleLogoStyle }, optional: true, nullable: false
|
|
18
|
+
|
|
13
19
|
field :header_text, -> { String }, optional: true, nullable: false
|
|
14
20
|
|
|
15
21
|
field :initial_stamps, -> { Integer }, optional: true, nullable: false
|
|
16
22
|
|
|
17
23
|
field :name, -> { String }, optional: false, nullable: false
|
|
18
24
|
|
|
25
|
+
field :qr_style, -> { Leal::Cards::Types::CreateCardsRequestCardQrStyle }, optional: true, nullable: false
|
|
26
|
+
|
|
27
|
+
field :referee_stamps, -> { Integer }, optional: true, nullable: false
|
|
28
|
+
|
|
29
|
+
field :referrals_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
30
|
+
|
|
31
|
+
field :referrer_stamps, -> { Integer }, optional: true, nullable: false
|
|
32
|
+
|
|
19
33
|
field :show_member_field, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
20
34
|
|
|
21
35
|
field :show_stamps_to_reward_field, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
@@ -4,6 +4,8 @@ module Leal
|
|
|
4
4
|
module Cards
|
|
5
5
|
module Types
|
|
6
6
|
class CreateCardsResponse < Internal::Types::Model
|
|
7
|
+
field :apple_pass_style, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
7
9
|
field :archived_at, -> { String }, optional: false, nullable: false
|
|
8
10
|
|
|
9
11
|
field :auxiliary_fields, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
@@ -16,6 +18,12 @@ module Leal
|
|
|
16
18
|
|
|
17
19
|
field :expires_at, -> { String }, optional: false, nullable: false
|
|
18
20
|
|
|
21
|
+
field :featured_actions, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
22
|
+
|
|
23
|
+
field :google_logo_style, -> { String }, optional: false, nullable: false
|
|
24
|
+
|
|
25
|
+
field :google_wallet, -> { Leal::Cards::Types::CreateCardsResponseGoogleWallet }, optional: false, nullable: false
|
|
26
|
+
|
|
19
27
|
field :header_text, -> { String }, optional: false, nullable: false
|
|
20
28
|
|
|
21
29
|
field :id, -> { Integer }, optional: false, nullable: false
|
|
@@ -24,6 +32,14 @@ module Leal
|
|
|
24
32
|
|
|
25
33
|
field :name, -> { String }, optional: false, nullable: false
|
|
26
34
|
|
|
35
|
+
field :qr_style, -> { String }, optional: false, nullable: false
|
|
36
|
+
|
|
37
|
+
field :referee_stamps, -> { Integer }, optional: false, nullable: false
|
|
38
|
+
|
|
39
|
+
field :referrals_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
40
|
+
|
|
41
|
+
field :referrer_stamps, -> { Integer }, optional: false, nullable: false
|
|
42
|
+
|
|
27
43
|
field :rewards_count, -> { Integer }, optional: false, nullable: false
|
|
28
44
|
|
|
29
45
|
field :show_member_field, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Leal
|
|
4
|
+
module Cards
|
|
5
|
+
module Types
|
|
6
|
+
class CreateCardsResponseGoogleWallet < Internal::Types::Model
|
|
7
|
+
field :hero_image, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :text_color, -> { String }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :warnings, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -4,6 +4,8 @@ module Leal
|
|
|
4
4
|
module Cards
|
|
5
5
|
module Types
|
|
6
6
|
class GetCardsResponse < Internal::Types::Model
|
|
7
|
+
field :apple_pass_style, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
7
9
|
field :archived_at, -> { String }, optional: false, nullable: false
|
|
8
10
|
|
|
9
11
|
field :auxiliary_fields, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
@@ -16,6 +18,12 @@ module Leal
|
|
|
16
18
|
|
|
17
19
|
field :expires_at, -> { String }, optional: false, nullable: false
|
|
18
20
|
|
|
21
|
+
field :featured_actions, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
22
|
+
|
|
23
|
+
field :google_logo_style, -> { String }, optional: false, nullable: false
|
|
24
|
+
|
|
25
|
+
field :google_wallet, -> { Leal::Cards::Types::GetCardsResponseGoogleWallet }, optional: false, nullable: false
|
|
26
|
+
|
|
19
27
|
field :header_text, -> { String }, optional: false, nullable: false
|
|
20
28
|
|
|
21
29
|
field :id, -> { Integer }, optional: false, nullable: false
|
|
@@ -24,6 +32,14 @@ module Leal
|
|
|
24
32
|
|
|
25
33
|
field :name, -> { String }, optional: false, nullable: false
|
|
26
34
|
|
|
35
|
+
field :qr_style, -> { String }, optional: false, nullable: false
|
|
36
|
+
|
|
37
|
+
field :referee_stamps, -> { Integer }, optional: false, nullable: false
|
|
38
|
+
|
|
39
|
+
field :referrals_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
40
|
+
|
|
41
|
+
field :referrer_stamps, -> { Integer }, optional: false, nullable: false
|
|
42
|
+
|
|
27
43
|
field :rewards_count, -> { Integer }, optional: false, nullable: false
|
|
28
44
|
|
|
29
45
|
field :show_member_field, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Leal
|
|
4
|
+
module Cards
|
|
5
|
+
module Types
|
|
6
|
+
class GetCardsResponseGoogleWallet < Internal::Types::Model
|
|
7
|
+
field :hero_image, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :text_color, -> { String }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :warnings, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -4,6 +4,8 @@ module Leal
|
|
|
4
4
|
module Cards
|
|
5
5
|
module Types
|
|
6
6
|
class ListCardsResponseItem < Internal::Types::Model
|
|
7
|
+
field :apple_pass_style, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
7
9
|
field :archived_at, -> { String }, optional: false, nullable: false
|
|
8
10
|
|
|
9
11
|
field :auxiliary_fields, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
@@ -16,6 +18,12 @@ module Leal
|
|
|
16
18
|
|
|
17
19
|
field :expires_at, -> { String }, optional: false, nullable: false
|
|
18
20
|
|
|
21
|
+
field :featured_actions, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
22
|
+
|
|
23
|
+
field :google_logo_style, -> { String }, optional: false, nullable: false
|
|
24
|
+
|
|
25
|
+
field :google_wallet, -> { Leal::Cards::Types::ListCardsResponseItemGoogleWallet }, optional: false, nullable: false
|
|
26
|
+
|
|
19
27
|
field :header_text, -> { String }, optional: false, nullable: false
|
|
20
28
|
|
|
21
29
|
field :id, -> { Integer }, optional: false, nullable: false
|
|
@@ -24,6 +32,14 @@ module Leal
|
|
|
24
32
|
|
|
25
33
|
field :name, -> { String }, optional: false, nullable: false
|
|
26
34
|
|
|
35
|
+
field :qr_style, -> { String }, optional: false, nullable: false
|
|
36
|
+
|
|
37
|
+
field :referee_stamps, -> { Integer }, optional: false, nullable: false
|
|
38
|
+
|
|
39
|
+
field :referrals_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
40
|
+
|
|
41
|
+
field :referrer_stamps, -> { Integer }, optional: false, nullable: false
|
|
42
|
+
|
|
27
43
|
field :rewards_count, -> { Integer }, optional: false, nullable: false
|
|
28
44
|
|
|
29
45
|
field :show_member_field, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Leal
|
|
4
|
+
module Cards
|
|
5
|
+
module Types
|
|
6
|
+
class ListCardsResponseItemGoogleWallet < Internal::Types::Model
|
|
7
|
+
field :hero_image, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :text_color, -> { String }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :warnings, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -4,18 +4,32 @@ module Leal
|
|
|
4
4
|
module Cards
|
|
5
5
|
module Types
|
|
6
6
|
class UpdateCardsRequestCard < Internal::Types::Model
|
|
7
|
+
field :apple_pass_style, -> { Leal::Cards::Types::UpdateCardsRequestCardApplePassStyle }, optional: true, nullable: false
|
|
8
|
+
|
|
7
9
|
field :auxiliary_fields, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
8
10
|
|
|
9
11
|
field :card_color, -> { String }, optional: true, nullable: false
|
|
10
12
|
|
|
11
13
|
field :expires_at, -> { String }, optional: true, nullable: false
|
|
12
14
|
|
|
15
|
+
field :featured_actions, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
16
|
+
|
|
17
|
+
field :google_logo_style, -> { Leal::Cards::Types::UpdateCardsRequestCardGoogleLogoStyle }, optional: true, nullable: false
|
|
18
|
+
|
|
13
19
|
field :header_text, -> { String }, optional: true, nullable: false
|
|
14
20
|
|
|
15
21
|
field :initial_stamps, -> { Integer }, optional: true, nullable: false
|
|
16
22
|
|
|
17
23
|
field :name, -> { String }, optional: true, nullable: false
|
|
18
24
|
|
|
25
|
+
field :qr_style, -> { Leal::Cards::Types::UpdateCardsRequestCardQrStyle }, optional: true, nullable: false
|
|
26
|
+
|
|
27
|
+
field :referee_stamps, -> { Integer }, optional: true, nullable: false
|
|
28
|
+
|
|
29
|
+
field :referrals_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
30
|
+
|
|
31
|
+
field :referrer_stamps, -> { Integer }, optional: true, nullable: false
|
|
32
|
+
|
|
19
33
|
field :show_member_field, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
20
34
|
|
|
21
35
|
field :show_stamps_to_reward_field, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
@@ -4,6 +4,8 @@ module Leal
|
|
|
4
4
|
module Cards
|
|
5
5
|
module Types
|
|
6
6
|
class UpdateCardsResponse < Internal::Types::Model
|
|
7
|
+
field :apple_pass_style, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
7
9
|
field :archived_at, -> { String }, optional: false, nullable: false
|
|
8
10
|
|
|
9
11
|
field :auxiliary_fields, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
@@ -16,6 +18,12 @@ module Leal
|
|
|
16
18
|
|
|
17
19
|
field :expires_at, -> { String }, optional: false, nullable: false
|
|
18
20
|
|
|
21
|
+
field :featured_actions, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
22
|
+
|
|
23
|
+
field :google_logo_style, -> { String }, optional: false, nullable: false
|
|
24
|
+
|
|
25
|
+
field :google_wallet, -> { Leal::Cards::Types::UpdateCardsResponseGoogleWallet }, optional: false, nullable: false
|
|
26
|
+
|
|
19
27
|
field :header_text, -> { String }, optional: false, nullable: false
|
|
20
28
|
|
|
21
29
|
field :id, -> { Integer }, optional: false, nullable: false
|
|
@@ -24,6 +32,14 @@ module Leal
|
|
|
24
32
|
|
|
25
33
|
field :name, -> { String }, optional: false, nullable: false
|
|
26
34
|
|
|
35
|
+
field :qr_style, -> { String }, optional: false, nullable: false
|
|
36
|
+
|
|
37
|
+
field :referee_stamps, -> { Integer }, optional: false, nullable: false
|
|
38
|
+
|
|
39
|
+
field :referrals_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
40
|
+
|
|
41
|
+
field :referrer_stamps, -> { Integer }, optional: false, nullable: false
|
|
42
|
+
|
|
27
43
|
field :rewards_count, -> { Integer }, optional: false, nullable: false
|
|
28
44
|
|
|
29
45
|
field :show_member_field, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Leal
|
|
4
|
+
module Cards
|
|
5
|
+
module Types
|
|
6
|
+
class UpdateCardsResponseGoogleWallet < Internal::Types::Model
|
|
7
|
+
field :hero_image, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :text_color, -> { String }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :warnings, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
data/lib/leal/client.rb
CHANGED
|
@@ -11,7 +11,7 @@ module Leal
|
|
|
11
11
|
@raw_client = Leal::Internal::Http::RawClient.new(
|
|
12
12
|
base_url: base_url || Leal::Environment::PRODUCTION,
|
|
13
13
|
headers: {
|
|
14
|
-
"User-Agent" => "leal/0.0.
|
|
14
|
+
"User-Agent" => "leal/0.0.16",
|
|
15
15
|
"X-Fern-Language" => "Ruby",
|
|
16
16
|
Authorization: "Bearer #{token}"
|
|
17
17
|
},
|
|
@@ -149,8 +149,10 @@ module Leal
|
|
|
149
149
|
end
|
|
150
150
|
end
|
|
151
151
|
|
|
152
|
-
# Adds stamps to a customer's loyalty card. Triggers ledger entries
|
|
153
|
-
# and push notifications. Pass `skip_notifications` to stamp silently.
|
|
152
|
+
# Adds stamps to a customer's loyalty card. Triggers ledger entries (`entry_type` `api`),
|
|
153
|
+
# wallet pass updates, and push notifications. Pass `skip_notifications` to stamp silently.
|
|
154
|
+
# Call it for real visits or purchases: if this customer joined with a friend's invite, the
|
|
155
|
+
# first call pays out the referral to both of them.
|
|
154
156
|
#
|
|
155
157
|
# @param request_options [Hash]
|
|
156
158
|
# @param params [Leal::CustomerCards::Types::StampCustomerCardsRequest]
|
|
@@ -28,6 +28,12 @@ module Leal
|
|
|
28
28
|
|
|
29
29
|
field :progress_percentage, -> { Integer }, optional: false, nullable: false
|
|
30
30
|
|
|
31
|
+
field :referral_url, -> { String }, optional: false, nullable: false
|
|
32
|
+
|
|
33
|
+
field :referrals_count, -> { Integer }, optional: false, nullable: false
|
|
34
|
+
|
|
35
|
+
field :referred_by, -> { Leal::CustomerCards::Types::GetCustomerCardsResponseReferredBy }, optional: false, nullable: false
|
|
36
|
+
|
|
31
37
|
field :stamps_count, -> { Integer }, optional: false, nullable: false
|
|
32
38
|
|
|
33
39
|
field :stamps_remaining, -> { Integer }, optional: false, nullable: false
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Leal
|
|
4
|
+
module CustomerCards
|
|
5
|
+
module Types
|
|
6
|
+
class GetCustomerCardsResponseReferredBy < Internal::Types::Model
|
|
7
|
+
field :customer_card_id, -> { Integer }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :customer_id, -> { Integer }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :referral_id, -> { Integer }, optional: false, nullable: false
|
|
12
|
+
|
|
13
|
+
field :rewarded_at, -> { String }, optional: false, nullable: false
|
|
14
|
+
|
|
15
|
+
field :status, -> { String }, optional: false, nullable: false
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -22,6 +22,8 @@ module Leal
|
|
|
22
22
|
|
|
23
23
|
field :progress_percentage, -> { Integer }, optional: false, nullable: false
|
|
24
24
|
|
|
25
|
+
field :referral_url, -> { String }, optional: false, nullable: false
|
|
26
|
+
|
|
25
27
|
field :stamps_count, -> { Integer }, optional: false, nullable: false
|
|
26
28
|
|
|
27
29
|
field :stamps_remaining, -> { Integer }, optional: false, nullable: false
|
|
@@ -28,6 +28,12 @@ module Leal
|
|
|
28
28
|
|
|
29
29
|
field :progress_percentage, -> { Integer }, optional: false, nullable: false
|
|
30
30
|
|
|
31
|
+
field :referral_url, -> { String }, optional: false, nullable: false
|
|
32
|
+
|
|
33
|
+
field :referrals_count, -> { Integer }, optional: false, nullable: false
|
|
34
|
+
|
|
35
|
+
field :referred_by, -> { Leal::CustomerCards::Types::StampCustomerCardsResponseReferredBy }, optional: false, nullable: false
|
|
36
|
+
|
|
31
37
|
field :stamps_count, -> { Integer }, optional: false, nullable: false
|
|
32
38
|
|
|
33
39
|
field :stamps_remaining, -> { Integer }, optional: false, nullable: false
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Leal
|
|
4
|
+
module CustomerCards
|
|
5
|
+
module Types
|
|
6
|
+
class StampCustomerCardsResponseReferredBy < Internal::Types::Model
|
|
7
|
+
field :customer_card_id, -> { Integer }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :customer_id, -> { Integer }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :referral_id, -> { Integer }, optional: false, nullable: false
|
|
12
|
+
|
|
13
|
+
field :rewarded_at, -> { String }, optional: false, nullable: false
|
|
14
|
+
|
|
15
|
+
field :status, -> { String }, optional: false, nullable: false
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -11,7 +11,9 @@ module Leal
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
# Returns a paginated list of customers for the store. Use the `search` parameter to filter
|
|
14
|
-
# by name, email, phone, card code (barcode), or external reference ID.
|
|
14
|
+
# by name, email, phone, card code (barcode), or external reference ID. A scanned wallet pass
|
|
15
|
+
# QR can be passed as it is: newer passes hold a link with the card code after the `#`, and
|
|
16
|
+
# that is matched to the card exactly. Alternatively, pass
|
|
15
17
|
# `source` AND `external_id` together to perform an exact lookup by an external reference -
|
|
16
18
|
# the response will contain at most one customer.
|
|
17
19
|
#
|
|
@@ -10,6 +10,8 @@ module Leal
|
|
|
10
10
|
|
|
11
11
|
field :customer, -> { Leal::Customers::Types::CreateCustomersRequestCustomer }, optional: false, nullable: false
|
|
12
12
|
|
|
13
|
+
field :referral_code, -> { String }, optional: true, nullable: false
|
|
14
|
+
|
|
13
15
|
field :send_card_links, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
14
16
|
end
|
|
15
17
|
end
|
data/lib/leal/version.rb
CHANGED
|
@@ -55,7 +55,7 @@ module Leal
|
|
|
55
55
|
# verify deliveries. The URL must be publicly reachable over https.
|
|
56
56
|
#
|
|
57
57
|
# Events: `customer.created`, `customer.updated`, `customer_card.created`, `stamp.earned`, `stamp.removed`,
|
|
58
|
-
# `reward.unlocked`, `reward.redeemed`, or `*` for all of them.
|
|
58
|
+
# `reward.unlocked`, `reward.redeemed`, `referral.created`, `referral.rewarded`, or `*` for all of them.
|
|
59
59
|
#
|
|
60
60
|
# @param request_options [Hash]
|
|
61
61
|
# @param params [Leal::WebhookSubscriptions::Types::PostAPIV1AccountsAccountIDWebhookSubscriptionsRequest]
|
data/lib/leal.rb
CHANGED
|
@@ -39,11 +39,21 @@ require_relative "leal/stores/types/list_stores_response_item"
|
|
|
39
39
|
require_relative "leal/stores/types/get_stores_response"
|
|
40
40
|
require_relative "leal/stores/types/update_stores_request_account"
|
|
41
41
|
require_relative "leal/stores/types/update_stores_response"
|
|
42
|
+
require_relative "leal/cards/types/list_cards_response_item_google_wallet"
|
|
42
43
|
require_relative "leal/cards/types/list_cards_response_item"
|
|
44
|
+
require_relative "leal/cards/types/create_cards_request_card_apple_pass_style"
|
|
45
|
+
require_relative "leal/cards/types/create_cards_request_card_google_logo_style"
|
|
46
|
+
require_relative "leal/cards/types/create_cards_request_card_qr_style"
|
|
43
47
|
require_relative "leal/cards/types/create_cards_request_card"
|
|
48
|
+
require_relative "leal/cards/types/create_cards_response_google_wallet"
|
|
44
49
|
require_relative "leal/cards/types/create_cards_response"
|
|
50
|
+
require_relative "leal/cards/types/get_cards_response_google_wallet"
|
|
45
51
|
require_relative "leal/cards/types/get_cards_response"
|
|
52
|
+
require_relative "leal/cards/types/update_cards_request_card_apple_pass_style"
|
|
53
|
+
require_relative "leal/cards/types/update_cards_request_card_google_logo_style"
|
|
54
|
+
require_relative "leal/cards/types/update_cards_request_card_qr_style"
|
|
46
55
|
require_relative "leal/cards/types/update_cards_request_card"
|
|
56
|
+
require_relative "leal/cards/types/update_cards_response_google_wallet"
|
|
47
57
|
require_relative "leal/cards/types/update_cards_response"
|
|
48
58
|
require_relative "leal/customers/types/list_customers_response_pagination"
|
|
49
59
|
require_relative "leal/customers/types/list_customers_response"
|
|
@@ -53,9 +63,11 @@ require_relative "leal/customers/types/get_customers_response"
|
|
|
53
63
|
require_relative "leal/customers/types/update_customers_request_customer"
|
|
54
64
|
require_relative "leal/customers/types/update_customers_response"
|
|
55
65
|
require_relative "leal/customer_cards/types/list_customer_cards_response_item"
|
|
66
|
+
require_relative "leal/customer_cards/types/get_customer_cards_response_referred_by"
|
|
56
67
|
require_relative "leal/customer_cards/types/get_customer_cards_response"
|
|
57
68
|
require_relative "leal/customer_cards/types/redeem_customer_cards_response_redemption"
|
|
58
69
|
require_relative "leal/customer_cards/types/redeem_customer_cards_response"
|
|
70
|
+
require_relative "leal/customer_cards/types/stamp_customer_cards_response_referred_by"
|
|
59
71
|
require_relative "leal/customer_cards/types/stamp_customer_cards_response"
|
|
60
72
|
require_relative "leal/locations/types/list_locations_response_item"
|
|
61
73
|
require_relative "leal/locations/types/create_locations_request_location"
|
data/reference.md
CHANGED
|
@@ -508,7 +508,9 @@ client.cards.update(
|
|
|
508
508
|
<dd>
|
|
509
509
|
|
|
510
510
|
Returns a paginated list of customers for the store. Use the `search` parameter to filter
|
|
511
|
-
by name, email, phone, card code (barcode), or external reference ID.
|
|
511
|
+
by name, email, phone, card code (barcode), or external reference ID. A scanned wallet pass
|
|
512
|
+
QR can be passed as it is: newer passes hold a link with the card code after the `#`, and
|
|
513
|
+
that is matched to the card exactly. Alternatively, pass
|
|
512
514
|
`source` AND `external_id` together to perform an exact lookup by an external reference -
|
|
513
515
|
the response will contain at most one customer.
|
|
514
516
|
</dd>
|
|
@@ -548,7 +550,7 @@ client.customers.list(account_id: 1)
|
|
|
548
550
|
<dl>
|
|
549
551
|
<dd>
|
|
550
552
|
|
|
551
|
-
**search:** `String` — Search query to filter customers by name, email, phone, card code (barcode), or external reference ID
|
|
553
|
+
**search:** `String` — Search query to filter customers by name, email, phone, card code (barcode, or the full scanned QR text), or external reference ID
|
|
552
554
|
|
|
553
555
|
</dd>
|
|
554
556
|
</dl>
|
|
@@ -678,6 +680,14 @@ client.customers.create(
|
|
|
678
680
|
<dl>
|
|
679
681
|
<dd>
|
|
680
682
|
|
|
683
|
+
**referral_code:** `String` — Records the new customer as invited by another customer: the code is the last part of that customer's `referral_url`. Needs `card_id`, for the same card, with referrals on. Nothing is given now; both customers get their stamps when the new customer's card is first stamped for a visit
|
|
684
|
+
|
|
685
|
+
</dd>
|
|
686
|
+
</dl>
|
|
687
|
+
|
|
688
|
+
<dl>
|
|
689
|
+
<dd>
|
|
690
|
+
|
|
681
691
|
**send_card_links:** `Internal::Types::Boolean` — When true, sends the card links to the customer via email/SMS after enrollment. Note: even without this flag, the response includes `apple_wallet_url` and `google_wallet_url` in each customer card object so you can deliver them yourself.
|
|
682
692
|
|
|
683
693
|
</dd>
|
|
@@ -1128,8 +1138,10 @@ client.customer_cards.redeem(
|
|
|
1128
1138
|
<dl>
|
|
1129
1139
|
<dd>
|
|
1130
1140
|
|
|
1131
|
-
Adds stamps to a customer's loyalty card. Triggers ledger entries
|
|
1132
|
-
and push notifications. Pass `skip_notifications` to stamp silently.
|
|
1141
|
+
Adds stamps to a customer's loyalty card. Triggers ledger entries (`entry_type` `api`),
|
|
1142
|
+
wallet pass updates, and push notifications. Pass `skip_notifications` to stamp silently.
|
|
1143
|
+
Call it for real visits or purchases: if this customer joined with a friend's invite, the
|
|
1144
|
+
first call pays out the referral to both of them.
|
|
1133
1145
|
</dd>
|
|
1134
1146
|
</dl>
|
|
1135
1147
|
</dd>
|
|
@@ -2439,7 +2451,7 @@ client.webhook_subscriptions.get_api_v1accounts_account_id_webhook_subscriptions
|
|
|
2439
2451
|
Subscribes a URL to one or more events. The response includes the signing `secret`; store it to
|
|
2440
2452
|
verify deliveries. The URL must be publicly reachable over https.
|
|
2441
2453
|
|
|
2442
|
-
Events: `customer.created`, `customer.updated`, `customer_card.created`, `stamp.earned`, `stamp.removed`, `reward.unlocked`, `reward.redeemed`, or `*` for all of them.
|
|
2454
|
+
Events: `customer.created`, `customer.updated`, `customer_card.created`, `stamp.earned`, `stamp.removed`, `reward.unlocked`, `reward.redeemed`, `referral.created`, `referral.rewarded`, or `*` for all of them.
|
|
2443
2455
|
</dd>
|
|
2444
2456
|
</dl>
|
|
2445
2457
|
</dd>
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: leal
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.16
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Leal
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: The Leal Ruby library provides convenient access to the Leal API from
|
|
14
14
|
Ruby.
|
|
@@ -29,18 +29,29 @@ files:
|
|
|
29
29
|
- lib/leal/cards/client.rb
|
|
30
30
|
- lib/leal/cards/types/create_cards_request.rb
|
|
31
31
|
- lib/leal/cards/types/create_cards_request_card.rb
|
|
32
|
+
- lib/leal/cards/types/create_cards_request_card_apple_pass_style.rb
|
|
33
|
+
- lib/leal/cards/types/create_cards_request_card_google_logo_style.rb
|
|
34
|
+
- lib/leal/cards/types/create_cards_request_card_qr_style.rb
|
|
32
35
|
- lib/leal/cards/types/create_cards_response.rb
|
|
36
|
+
- lib/leal/cards/types/create_cards_response_google_wallet.rb
|
|
33
37
|
- lib/leal/cards/types/get_cards_request.rb
|
|
34
38
|
- lib/leal/cards/types/get_cards_response.rb
|
|
39
|
+
- lib/leal/cards/types/get_cards_response_google_wallet.rb
|
|
35
40
|
- lib/leal/cards/types/list_cards_request.rb
|
|
36
41
|
- lib/leal/cards/types/list_cards_response_item.rb
|
|
42
|
+
- lib/leal/cards/types/list_cards_response_item_google_wallet.rb
|
|
37
43
|
- lib/leal/cards/types/update_cards_request.rb
|
|
38
44
|
- lib/leal/cards/types/update_cards_request_card.rb
|
|
45
|
+
- lib/leal/cards/types/update_cards_request_card_apple_pass_style.rb
|
|
46
|
+
- lib/leal/cards/types/update_cards_request_card_google_logo_style.rb
|
|
47
|
+
- lib/leal/cards/types/update_cards_request_card_qr_style.rb
|
|
39
48
|
- lib/leal/cards/types/update_cards_response.rb
|
|
49
|
+
- lib/leal/cards/types/update_cards_response_google_wallet.rb
|
|
40
50
|
- lib/leal/client.rb
|
|
41
51
|
- lib/leal/customer_cards/client.rb
|
|
42
52
|
- lib/leal/customer_cards/types/get_customer_cards_request.rb
|
|
43
53
|
- lib/leal/customer_cards/types/get_customer_cards_response.rb
|
|
54
|
+
- lib/leal/customer_cards/types/get_customer_cards_response_referred_by.rb
|
|
44
55
|
- lib/leal/customer_cards/types/list_customer_cards_request.rb
|
|
45
56
|
- lib/leal/customer_cards/types/list_customer_cards_response_item.rb
|
|
46
57
|
- lib/leal/customer_cards/types/redeem_customer_cards_request.rb
|
|
@@ -48,6 +59,7 @@ files:
|
|
|
48
59
|
- lib/leal/customer_cards/types/redeem_customer_cards_response_redemption.rb
|
|
49
60
|
- lib/leal/customer_cards/types/stamp_customer_cards_request.rb
|
|
50
61
|
- lib/leal/customer_cards/types/stamp_customer_cards_response.rb
|
|
62
|
+
- lib/leal/customer_cards/types/stamp_customer_cards_response_referred_by.rb
|
|
51
63
|
- lib/leal/customers/client.rb
|
|
52
64
|
- lib/leal/customers/types/create_customers_request.rb
|
|
53
65
|
- lib/leal/customers/types/create_customers_request_customer.rb
|