vauchar_api 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de9ad783b851e7efc3ca676479686d67d423222bbc534809a7db1419804d7d16
4
- data.tar.gz: 5e403ee02e73275c72556ad14eabff501c04134d2e1c8e6f3162644112a60b8c
3
+ metadata.gz: 1947cca764a3d6ec56d5c1b6527cb97b028edfb160f66842134cc89d60b1fa26
4
+ data.tar.gz: 32938b5fea2c4f33bdb4bd1fd4d6d009955d8cc8ff60168a7823dda8ff96fc96
5
5
  SHA512:
6
- metadata.gz: 64208e57af86116b2a5baf7268dbcf8c03485a4c3a01bcdb58c46b153f931c609d7ad7caed0624976fc5d2d0cb8ef5e196526912471fdf4f7124cdbaa4d6f8d0
7
- data.tar.gz: 89dca416c9335b2964be2c8579b0e04e507941f1ab20bf2d831b736b8799755dafcc5f44b7ca8aa02af3c12b9df562d9bf97895db3e903a3d2ef85456d94d39f
6
+ metadata.gz: d2129c049585f6ef2bf0ebf5df88b28817a9b8916febcc2803eb7fbe80fcba9b39332dfa38d756878108c2bd239ffb10c37bd77602dd13d6017d8e5a1921fda5
7
+ data.tar.gz: eb757bafb8c2a73a29b0aa6dc014527711b4f02906f774331965fe57de9d1b03f7427177cabf3999aa289073f36f051bc376fe6472d014264c8580b951cd560c
@@ -1,21 +1,22 @@
1
1
  module VaucharAPI
2
2
  # ==== Examples
3
- # [Create]
4
- # new_brand = VaucharAPI::Brand.new(name: "test by max", email: "max@gmail.com")
5
- # new_brand.save
6
3
  #
7
- # [Read]
8
- # brand = VaucharAPI::Brand.find("brn-15510817645c73a12406a95")
9
- # brands = VaucharAPI::Brand.all
4
+ # Create
5
+ # new_brand = VaucharAPI::Brand.new(name: "test by max", email: "max@gmail.com")
6
+ # new_brand.save
10
7
  #
11
- # [Update]
12
- # brand = VaucharAPI::Brand.find("brn-15510817645c73a12406a95")
13
- # brand.name = "test update"
14
- # brand.save
8
+ # Read
9
+ # brand = VaucharAPI::Brand.find("brn-15510817645c73a12406a95")
10
+ # brands = VaucharAPI::Brand.all
15
11
  #
16
- # [Delete]
17
- # brand = VaucharAPI::Brand.find("brn-15510817645c73a12406a95")
18
- # brand.destroy
12
+ # Update
13
+ # brand = VaucharAPI::Brand.find("brn-15510817645c73a12406a95")
14
+ # brand.name = "test update"
15
+ # brand.save
16
+ #
17
+ # Delete
18
+ # brand = VaucharAPI::Brand.find("brn-15510817645c73a12406a95")
19
+ # brand.destroy
19
20
 
20
21
  class Brand < Base
21
22
  def accepts_attributes
@@ -1,27 +1,28 @@
1
1
  module VaucharAPI
2
2
  # ==== Examples
3
- # [Create]
4
- # new_customer = VaucharAPI::Customer.new({
5
- # user_id: "12345",
6
- # name: "max",
7
- # email: "max@gmail.com",
8
- # phone: "+886912345678",
9
- # birthday: "1990-03-25",
10
- # })
11
- # new_customer.save
12
3
  #
13
- # [Read]
14
- # customer = VaucharAPI::Customer.find("cust-15507323535c6e4c416c697")
15
- # customers = VaucharAPI::Customer.all
4
+ # Create
5
+ # new_customer = VaucharAPI::Customer.new({
6
+ # user_id: "12345",
7
+ # name: "max",
8
+ # email: "max@gmail.com",
9
+ # phone: "+886912345678",
10
+ # birthday: "1990-03-25",
11
+ # })
12
+ # new_customer.save
16
13
  #
17
- # [Update]
18
- # customer = VaucharAPI::Customer.find("cust-15507323535c6e4c416c697")
19
- # customer.name = "test update"
20
- # customer.save
14
+ # Read
15
+ # customer = VaucharAPI::Customer.find("cust-15507323535c6e4c416c697")
16
+ # customers = VaucharAPI::Customer.all
21
17
  #
22
- # [Delete]
23
- # customer = VaucharAPI::Customer.find("cust-15507323535c6e4c416c697")
24
- # customer.destroy
18
+ # Update
19
+ # customer = VaucharAPI::Customer.find("cust-15507323535c6e4c416c697")
20
+ # customer.name = "test update"
21
+ # customer.save
22
+ #
23
+ # Delete
24
+ # customer = VaucharAPI::Customer.find("cust-15507323535c6e4c416c697")
25
+ # customer.destroy
25
26
 
26
27
  class Customer < Base
27
28
  def accepts_attributes
@@ -1,14 +1,15 @@
1
1
  module VaucharAPI
2
2
  # ==== Examples
3
- # [Read]
4
- # deals = VaucharAPI::CustomerDeal.find(:all, params: {customer_id: "cust-15507323535c6e4c416c697"})
5
3
  #
6
- # [Redemptions]
7
- # deals[1].redemptions
8
- # deals[1].voucher.voucher_code # => "DA2C2J65JFVNY"
4
+ # Read
5
+ # deals = VaucharAPI::CustomerDeal.find(:all, params: {customer_id: "cust-15507323535c6e4c416c697"})
9
6
  #
10
- # [Validate]
11
- # deals[1].validate
7
+ # Redemptions
8
+ # deals[1].redemptions
9
+ # deals[1].voucher.voucher_code # => "DA2C2J65JFVNY"
10
+ #
11
+ # Validate
12
+ # deals[1].validate
12
13
 
13
14
  class CustomerDeal < Base
14
15
  init_prefix :customer
@@ -38,6 +39,7 @@ module VaucharAPI
38
39
  end
39
40
 
40
41
  # ==== Examples
42
+ #
41
43
  # voucher = VaucharAPI::CustomerDeal.redemptions(
42
44
  # {},
43
45
  # params: {
@@ -1,30 +1,31 @@
1
1
  module VaucharAPI
2
2
  # ==== Examples
3
- # [Create]
4
- # new_deal = VaucharAPI::Deal.new({
5
- # title: "max_test",
6
- # brand_id: "brn-15507182295c6e1515a956a",
7
- # voucher_data: {
8
- # value: "30",
9
- # value_unit: "value",
10
- # currency: "USD",
11
- # expiry_time_type: "relative",
12
- # expiry_time: "10",
13
- # expiry_time_unit: "hours",
14
- # },
15
- # })
16
- # new_deal.save
17
3
  #
18
- # [Read]
19
- # deal = VaucharAPI::Deal.find("en-deal-15499589715c627f3b57837")
20
- # deals = VaucharAPI::Deal.all
4
+ # Create
5
+ # new_deal = VaucharAPI::Deal.new({
6
+ # title: "max_test",
7
+ # brand_id: "brn-15507182295c6e1515a956a",
8
+ # voucher_data: {
9
+ # value: "30",
10
+ # value_unit: "value",
11
+ # currency: "USD",
12
+ # expiry_time_type: "relative",
13
+ # expiry_time: "10",
14
+ # expiry_time_unit: "hours",
15
+ # },
16
+ # })
17
+ # new_deal.save
21
18
  #
22
- # [Delete]
23
- # deal = VaucharAPI::Deal.find("en-deal-15499589715c627f3b57837")
24
- # deal.destroy
19
+ # Read
20
+ # deal = VaucharAPI::Deal.find("en-deal-15499589715c627f3b57837")
21
+ # deals = VaucharAPI::Deal.all
25
22
  #
26
- # [Find By Brand]
27
- # deals = VaucharAPI::Deal.find(:all, params: {brand_id: "brn-15507182295c6e1515a956a"})
23
+ # Delete
24
+ # deal = VaucharAPI::Deal.find("en-deal-15499589715c627f3b57837")
25
+ # deal.destroy
26
+ #
27
+ # Find By Brand
28
+ # deals = VaucharAPI::Deal.find(:all, params: {brand_id: "brn-15507182295c6e1515a956a"})
28
29
 
29
30
  class Deal < Base
30
31
  self.prefix = "/engage/"
@@ -1,36 +1,37 @@
1
1
  module VaucharAPI
2
2
  # ==== Examples
3
- # [Create]
4
- # new_list = VaucharAPI::List.new(name: "max list", brand_id: "brn-15507182295c6e1515a956a")
5
- # new_list.save
6
3
  #
7
- # [Read]
8
- # list = VaucharAPI::List.find("list-15508273755c6fbf6fc8ac7")
9
- # lists = VaucharAPI::List.all
4
+ # Create
5
+ # new_list = VaucharAPI::List.new(name: "max list", brand_id: "brn-15507182295c6e1515a956a")
6
+ # new_list.save
10
7
  #
11
- # [Update]
12
- # list = VaucharAPI::List.find("list-15508273755c6fbf6fc8ac7")
13
- # list.name = "Max update"
14
- # list.save
8
+ # Read
9
+ # list = VaucharAPI::List.find("list-15508273755c6fbf6fc8ac7")
10
+ # lists = VaucharAPI::List.all
15
11
  #
16
- # [Delete]
17
- # list = VaucharAPI::List.find("list-15508273755c6fbf6fc8ac7")
18
- # list.destroy
12
+ # Update
13
+ # list = VaucharAPI::List.find("list-15508273755c6fbf6fc8ac7")
14
+ # list.name = "Max update"
15
+ # list.save
19
16
  #
20
- # [Customers]
21
- # list = VaucharAPI::List.find("list-15502036875c663b27600fe")
22
- # list.get(:customers);
17
+ # Delete
18
+ # list = VaucharAPI::List.find("list-15508273755c6fbf6fc8ac7")
19
+ # list.destroy
23
20
  #
24
- # [Add Customers]
25
- # list = VaucharAPI::List.find("list-15502036875c663b27600fe")
26
- # list.post(:customers, {}, {customers: ["cust-15508280955c6fc23f7f807", "cust-15507323535c6e4c416c697"]}.to_json)
21
+ # Customers
22
+ # list = VaucharAPI::List.find("list-15502036875c663b27600fe")
23
+ # list.get(:customers);
27
24
  #
28
- # [Delete Customers]
29
- # list = VaucharAPI::List.find("list-15502036875c663b27600fe")
30
- # list.delete(:customers, {}, {customers: ["cust-15508280955c6fc23f7f807", "cust-15507323535c6e4c416c697"]})
25
+ # Add Customers
26
+ # list = VaucharAPI::List.find("list-15502036875c663b27600fe")
27
+ # list.post(:customers, {}, {customers: ["cust-15508280955c6fc23f7f807", "cust-15507323535c6e4c416c697"]}.to_json)
31
28
  #
32
- # [Find By Brand]
33
- # lists = VaucharAPI::List.find(:all, params: {brand_id: "brn-15507182295c6e1515a956a"})
29
+ # Delete Customers
30
+ # list = VaucharAPI::List.find("list-15502036875c663b27600fe")
31
+ # list.delete(:customers, {}, {customers: ["cust-15508280955c6fc23f7f807", "cust-15507323535c6e4c416c697"]})
32
+ #
33
+ # Find By Brand
34
+ # lists = VaucharAPI::List.find(:all, params: {brand_id: "brn-15507182295c6e1515a956a"})
34
35
 
35
36
  class List < Base
36
37
  self.prefix = "/engage/"
@@ -0,0 +1,18 @@
1
+ module VaucharAPI
2
+ # ==== Examples
3
+ #
4
+ # Create
5
+ # new_team = VaucharAPI::Team.new(name: "test by max", email: "max@gmail.com", password: "123456")
6
+ # new_team.save
7
+ #
8
+ # Read
9
+ # team = VaucharAPI::Team.find("DA2C253VYBM")
10
+ # teams = VaucharAPI::Team.all
11
+ #
12
+ # Delete
13
+ # team = VaucharAPI::Team.find("DA2C253VYBM")
14
+ # team.destroy
15
+
16
+ class Team < Base
17
+ end
18
+ end
@@ -1,3 +1,3 @@
1
1
  module VaucharAPI
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vauchar_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-26 00:00:00.000000000 Z
11
+ date: 2019-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -82,6 +82,7 @@ files:
82
82
  - lib/vauchar_api/resources/customer_deal.rb
83
83
  - lib/vauchar_api/resources/deal.rb
84
84
  - lib/vauchar_api/resources/list.rb
85
+ - lib/vauchar_api/resources/team.rb
85
86
  - lib/vauchar_api/resources/verify_credentials.rb
86
87
  - lib/vauchar_api/version.rb
87
88
  - vauchar_api.gemspec