pokepay_partner_ruby_sdk 0.3.0 → 0.3.2

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.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/docs/index.md +592 -187
  4. data/lib/pokepay_partner_ruby_sdk/request/create_topup_transaction_with_check.rb +2 -2
  5. data/lib/pokepay_partner_ruby_sdk/request/create_webhook.rb +16 -0
  6. data/lib/pokepay_partner_ruby_sdk/request/get_bulk_transaction.rb +5 -5
  7. data/lib/pokepay_partner_ruby_sdk/request/get_coupon.rb +15 -0
  8. data/lib/pokepay_partner_ruby_sdk/request/list_bulk_transaction_jobs.rb +15 -0
  9. data/lib/pokepay_partner_ruby_sdk/request/list_coupons.rb +15 -0
  10. data/lib/pokepay_partner_ruby_sdk/request/list_webhooks.rb +15 -0
  11. data/lib/pokepay_partner_ruby_sdk/request/update_webhook.rb +15 -0
  12. data/lib/pokepay_partner_ruby_sdk/response/coupon.rb +48 -0
  13. data/lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb +55 -0
  14. data/lib/pokepay_partner_ruby_sdk/response/organization_worker_task_webhook.rb +21 -0
  15. data/lib/pokepay_partner_ruby_sdk/response/paginated_coupons.rb +16 -0
  16. data/lib/pokepay_partner_ruby_sdk/response/paginated_organization_worker_task_webhook.rb +16 -0
  17. data/lib/pokepay_partner_ruby_sdk/response/private_money.rb +2 -0
  18. data/lib/pokepay_partner_ruby_sdk/response/shop_with_accounts.rb +2 -0
  19. data/lib/pokepay_partner_ruby_sdk/response/shop_with_metadata.rb +2 -0
  20. data/lib/pokepay_partner_ruby_sdk/response/transaction.rb +4 -0
  21. data/lib/pokepay_partner_ruby_sdk/response/transaction_detail.rb +4 -0
  22. data/lib/pokepay_partner_ruby_sdk/version.rb +1 -1
  23. data/lib/pokepay_partner_ruby_sdk.rb +11 -2
  24. data/partner.yaml +591 -53
  25. metadata +13 -3
  26. data/lib/pokepay_partner_ruby_sdk/response/user_transaction.rb +0 -33
@@ -4,11 +4,11 @@ require "pokepay_partner_ruby_sdk/response/transaction_detail"
4
4
 
5
5
  module Pokepay::Request
6
6
  class CreateTopupTransactionWithCheck < Request
7
- def initialize(check_id, customer_id)
7
+ def initialize(check_id, customer_id, rest_args = {})
8
8
  @path = "/transactions" + "/topup" + "/check"
9
9
  @method = "POST"
10
10
  @body_params = { "check_id" => check_id,
11
- "customer_id" => customer_id }
11
+ "customer_id" => customer_id }.merge(rest_args)
12
12
  @response_class = Pokepay::Response::TransactionDetail
13
13
  end
14
14
  attr_reader :response_class
@@ -0,0 +1,16 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/organization_worker_task_webhook"
4
+
5
+ module Pokepay::Request
6
+ class CreateWebhook < Request
7
+ def initialize(task, url)
8
+ @path = "/webhooks"
9
+ @method = "POST"
10
+ @body_params = { "task" => task,
11
+ "url" => url }
12
+ @response_class = Pokepay::Response::OrganizationWorkerTaskWebhook
13
+ end
14
+ attr_reader :response_class
15
+ end
16
+ end
@@ -1,14 +1,14 @@
1
1
  # DO NOT EDIT: File is generated by code generator.
2
2
 
3
- require "pokepay_partner_ruby_sdk/response/paginated_bulk_transaction_job"
3
+ require "pokepay_partner_ruby_sdk/response/bulk_transaction"
4
4
 
5
5
  module Pokepay::Request
6
6
  class GetBulkTransaction < Request
7
- def initialize(bulk_transaction_id, rest_args = {})
8
- @path = "/bulk-transactions" + "/" + bulk_transaction_id + "/jobs"
7
+ def initialize(bulk_transaction_id)
8
+ @path = "/bulk-transactions" + "/" + bulk_transaction_id
9
9
  @method = "GET"
10
- @body_params = { }.merge(rest_args)
11
- @response_class = Pokepay::Response::PaginatedBulkTransactionJob
10
+ @body_params = { }
11
+ @response_class = Pokepay::Response::BulkTransaction
12
12
  end
13
13
  attr_reader :response_class
14
14
  end
@@ -0,0 +1,15 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/coupon_detail"
4
+
5
+ module Pokepay::Request
6
+ class GetCoupon < Request
7
+ def initialize(coupon_id)
8
+ @path = "/coupons" + "/" + coupon-id
9
+ @method = "GET"
10
+ @body_params = { }
11
+ @response_class = Pokepay::Response::CouponDetail
12
+ end
13
+ attr_reader :response_class
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/paginated_bulk_transaction_job"
4
+
5
+ module Pokepay::Request
6
+ class ListBulkTransactionJobs < Request
7
+ def initialize(bulk_transaction_id, rest_args = {})
8
+ @path = "/bulk-transactions" + "/" + bulk_transaction_id + "/jobs"
9
+ @method = "GET"
10
+ @body_params = { }.merge(rest_args)
11
+ @response_class = Pokepay::Response::PaginatedBulkTransactionJob
12
+ end
13
+ attr_reader :response_class
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/paginated_coupons"
4
+
5
+ module Pokepay::Request
6
+ class ListCoupons < Request
7
+ def initialize(private_money_id, rest_args = {})
8
+ @path = "/coupons"
9
+ @method = "GET"
10
+ @body_params = { "private_money_id" => private_money_id }.merge(rest_args)
11
+ @response_class = Pokepay::Response::PaginatedCoupons
12
+ end
13
+ attr_reader :response_class
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/paginated_organization_worker_task_webhook"
4
+
5
+ module Pokepay::Request
6
+ class ListWebhooks < Request
7
+ def initialize(rest_args = {})
8
+ @path = "/webhooks"
9
+ @method = "GET"
10
+ @body_params = { }.merge(rest_args)
11
+ @response_class = Pokepay::Response::PaginatedOrganizationWorkerTaskWebhook
12
+ end
13
+ attr_reader :response_class
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/organization_worker_task_webhook"
4
+
5
+ module Pokepay::Request
6
+ class UpdateWebhook < Request
7
+ def initialize(webhook_id, rest_args = {})
8
+ @path = "/webhooks" + "/" + webhook_id
9
+ @method = "PATCH"
10
+ @body_params = { }.merge(rest_args)
11
+ @response_class = Pokepay::Response::OrganizationWorkerTaskWebhook
12
+ end
13
+ attr_reader :response_class
14
+ end
15
+ end
@@ -0,0 +1,48 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/user"
4
+
5
+ module Pokepay::Response
6
+ class Coupon
7
+ def initialize(row)
8
+ @id = row["id"]
9
+ @name = row["name"]
10
+ @issued_shop = User.new(row["issued_shop"])
11
+ @description = row["description"]
12
+ @discount_amount = row["discount_amount"]
13
+ @discount_percentage = row["discount_percentage"]
14
+ @discount_upper_limit = row["discount_upper_limit"]
15
+ @starts_at = row["starts_at"]
16
+ @ends_at = row["ends_at"]
17
+ @display_starts_at = row["display_starts_at"]
18
+ @display_ends_at = row["display_ends_at"]
19
+ @usage_limit = row["usage_limit"]
20
+ @min_amount = row["min_amount"]
21
+ @is_shop_specified = row["is_shop_specified"]
22
+ @is_hidden = row["is_hidden"]
23
+ @is_public = row["is_public"]
24
+ @code = row["code"]
25
+ @is_disabled = row["is_disabled"]
26
+ @token = row["token"]
27
+ end
28
+ attr_reader :id
29
+ attr_reader :name
30
+ attr_reader :issued_shop
31
+ attr_reader :description
32
+ attr_reader :discount_amount
33
+ attr_reader :discount_percentage
34
+ attr_reader :discount_upper_limit
35
+ attr_reader :starts_at
36
+ attr_reader :ends_at
37
+ attr_reader :display_starts_at
38
+ attr_reader :display_ends_at
39
+ attr_reader :usage_limit
40
+ attr_reader :min_amount
41
+ attr_reader :is_shop_specified
42
+ attr_reader :is_hidden
43
+ attr_reader :is_public
44
+ attr_reader :code
45
+ attr_reader :is_disabled
46
+ attr_reader :token
47
+ end
48
+ end
@@ -0,0 +1,55 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/user"
4
+ require "pokepay_partner_ruby_sdk/response/private_money"
5
+
6
+ module Pokepay::Response
7
+ class CouponDetail
8
+ def initialize(row)
9
+ @id = row["id"]
10
+ @name = row["name"]
11
+ @issued_shop = User.new(row["issued_shop"])
12
+ @description = row["description"]
13
+ @discount_amount = row["discount_amount"]
14
+ @discount_percentage = row["discount_percentage"]
15
+ @discount_upper_limit = row["discount_upper_limit"]
16
+ @starts_at = row["starts_at"]
17
+ @ends_at = row["ends_at"]
18
+ @display_starts_at = row["display_starts_at"]
19
+ @display_ends_at = row["display_ends_at"]
20
+ @usage_limit = row["usage_limit"]
21
+ @min_amount = row["min_amount"]
22
+ @is_shop_specified = row["is_shop_specified"]
23
+ @is_hidden = row["is_hidden"]
24
+ @is_public = row["is_public"]
25
+ @code = row["code"]
26
+ @is_disabled = row["is_disabled"]
27
+ @token = row["token"]
28
+ @coupon_image = row["coupon_image"]
29
+ @available_shops = row["available_shops"]
30
+ @private_money = PrivateMoney.new(row["private_money"])
31
+ end
32
+ attr_reader :id
33
+ attr_reader :name
34
+ attr_reader :issued_shop
35
+ attr_reader :description
36
+ attr_reader :discount_amount
37
+ attr_reader :discount_percentage
38
+ attr_reader :discount_upper_limit
39
+ attr_reader :starts_at
40
+ attr_reader :ends_at
41
+ attr_reader :display_starts_at
42
+ attr_reader :display_ends_at
43
+ attr_reader :usage_limit
44
+ attr_reader :min_amount
45
+ attr_reader :is_shop_specified
46
+ attr_reader :is_hidden
47
+ attr_reader :is_public
48
+ attr_reader :code
49
+ attr_reader :is_disabled
50
+ attr_reader :token
51
+ attr_reader :coupon_image
52
+ attr_reader :available_shops
53
+ attr_reader :private_money
54
+ end
55
+ end
@@ -0,0 +1,21 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+
4
+ module Pokepay::Response
5
+ class OrganizationWorkerTaskWebhook
6
+ def initialize(row)
7
+ @id = row["id"]
8
+ @organization_code = row["organization_code"]
9
+ @task = row["task"]
10
+ @url = row["url"]
11
+ @content_type = row["content_type"]
12
+ @is_active = row["is_active"]
13
+ end
14
+ attr_reader :id
15
+ attr_reader :organization_code
16
+ attr_reader :task
17
+ attr_reader :url
18
+ attr_reader :content_type
19
+ attr_reader :is_active
20
+ end
21
+ end
@@ -0,0 +1,16 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/pagination"
4
+
5
+ module Pokepay::Response
6
+ class PaginatedCoupons
7
+ def initialize(row)
8
+ @rows = row["rows"]
9
+ @count = row["count"]
10
+ @pagination = Pagination.new(row["pagination"])
11
+ end
12
+ attr_reader :rows
13
+ attr_reader :count
14
+ attr_reader :pagination
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # DO NOT EDIT: File is generated by code generator.
2
+
3
+ require "pokepay_partner_ruby_sdk/response/pagination"
4
+
5
+ module Pokepay::Response
6
+ class PaginatedOrganizationWorkerTaskWebhook
7
+ def initialize(row)
8
+ @rows = row["rows"]
9
+ @count = row["count"]
10
+ @pagination = Pagination.new(row["pagination"])
11
+ end
12
+ attr_reader :rows
13
+ attr_reader :count
14
+ attr_reader :pagination
15
+ end
16
+ end
@@ -14,6 +14,7 @@ module Pokepay::Response
14
14
  @organization = Organization.new(row["organization"])
15
15
  @max_balance = row["max_balance"]
16
16
  @transfer_limit = row["transfer_limit"]
17
+ @money_topup_transfer_limit = row["money_topup_transfer_limit"]
17
18
  @type = row["type"]
18
19
  @expiration_type = row["expiration_type"]
19
20
  @enable_topup_by_member = row["enable_topup_by_member"]
@@ -28,6 +29,7 @@ module Pokepay::Response
28
29
  attr_reader :organization
29
30
  attr_reader :max_balance
30
31
  attr_reader :transfer_limit
32
+ attr_reader :money_topup_transfer_limit
31
33
  attr_reader :type
32
34
  attr_reader :expiration_type
33
35
  attr_reader :enable_topup_by_member
@@ -7,6 +7,7 @@ module Pokepay::Response
7
7
  @id = row["id"]
8
8
  @name = row["name"]
9
9
  @organization_code = row["organization_code"]
10
+ @status = row["status"]
10
11
  @postal_code = row["postal_code"]
11
12
  @address = row["address"]
12
13
  @tel = row["tel"]
@@ -17,6 +18,7 @@ module Pokepay::Response
17
18
  attr_reader :id
18
19
  attr_reader :name
19
20
  attr_reader :organization_code
21
+ attr_reader :status
20
22
  attr_reader :postal_code
21
23
  attr_reader :address
22
24
  attr_reader :tel
@@ -7,6 +7,7 @@ module Pokepay::Response
7
7
  @id = row["id"]
8
8
  @name = row["name"]
9
9
  @organization_code = row["organization_code"]
10
+ @status = row["status"]
10
11
  @postal_code = row["postal_code"]
11
12
  @address = row["address"]
12
13
  @tel = row["tel"]
@@ -16,6 +17,7 @@ module Pokepay::Response
16
17
  attr_reader :id
17
18
  attr_reader :name
18
19
  attr_reader :organization_code
20
+ attr_reader :status
19
21
  attr_reader :postal_code
20
22
  attr_reader :address
21
23
  attr_reader :tel
@@ -18,6 +18,8 @@ module Pokepay::Response
18
18
  @amount = row["amount"]
19
19
  @money_amount = row["money_amount"]
20
20
  @point_amount = row["point_amount"]
21
+ @raw_point_amount = row["raw_point_amount"]
22
+ @campaign_point_amount = row["campaign_point_amount"]
21
23
  @done_at = row["done_at"]
22
24
  @description = row["description"]
23
25
  end
@@ -31,6 +33,8 @@ module Pokepay::Response
31
33
  attr_reader :amount
32
34
  attr_reader :money_amount
33
35
  attr_reader :point_amount
36
+ attr_reader :raw_point_amount
37
+ attr_reader :campaign_point_amount
34
38
  attr_reader :done_at
35
39
  attr_reader :description
36
40
  end
@@ -18,6 +18,8 @@ module Pokepay::Response
18
18
  @amount = row["amount"]
19
19
  @money_amount = row["money_amount"]
20
20
  @point_amount = row["point_amount"]
21
+ @raw_point_amount = row["raw_point_amount"]
22
+ @campaign_point_amount = row["campaign_point_amount"]
21
23
  @done_at = row["done_at"]
22
24
  @description = row["description"]
23
25
  @transfers = row["transfers"]
@@ -32,6 +34,8 @@ module Pokepay::Response
32
34
  attr_reader :amount
33
35
  attr_reader :money_amount
34
36
  attr_reader :point_amount
37
+ attr_reader :raw_point_amount
38
+ attr_reader :campaign_point_amount
35
39
  attr_reader :done_at
36
40
  attr_reader :description
37
41
  attr_reader :transfers
@@ -1,3 +1,3 @@
1
1
  module Pokepay
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -53,7 +53,7 @@ require "pokepay_partner_ruby_sdk/request/get_private_money_organization_summari
53
53
  require "pokepay_partner_ruby_sdk/request/get_private_money_summary"
54
54
  require "pokepay_partner_ruby_sdk/request/list_customer_transactions"
55
55
  require "pokepay_partner_ruby_sdk/request/get_bulk_transaction"
56
- require "pokepay_partner_ruby_sdk/request/get_bulk_transaction"
56
+ require "pokepay_partner_ruby_sdk/request/list_bulk_transaction_jobs"
57
57
  require "pokepay_partner_ruby_sdk/request/create_cashtray"
58
58
  require "pokepay_partner_ruby_sdk/request/get_cashtray"
59
59
  require "pokepay_partner_ruby_sdk/request/cancel_cashtray"
@@ -63,6 +63,11 @@ require "pokepay_partner_ruby_sdk/request/list_campaigns"
63
63
  require "pokepay_partner_ruby_sdk/request/get_campaign"
64
64
  require "pokepay_partner_ruby_sdk/request/update_campaign"
65
65
  require "pokepay_partner_ruby_sdk/request/request_user_stats"
66
+ require "pokepay_partner_ruby_sdk/request/create_webhook"
67
+ require "pokepay_partner_ruby_sdk/request/list_webhooks"
68
+ require "pokepay_partner_ruby_sdk/request/update_webhook"
69
+ require "pokepay_partner_ruby_sdk/request/list_coupons"
70
+ require "pokepay_partner_ruby_sdk/request/get_coupon"
66
71
  require "pokepay_partner_ruby_sdk/response/pong"
67
72
  require "pokepay_partner_ruby_sdk/response/echo"
68
73
  require "pokepay_partner_ruby_sdk/response/pagination"
@@ -86,7 +91,6 @@ require "pokepay_partner_ruby_sdk/response/transaction"
86
91
  require "pokepay_partner_ruby_sdk/response/transaction_detail"
87
92
  require "pokepay_partner_ruby_sdk/response/shop_with_metadata"
88
93
  require "pokepay_partner_ruby_sdk/response/shop_with_accounts"
89
- require "pokepay_partner_ruby_sdk/response/user_transaction"
90
94
  require "pokepay_partner_ruby_sdk/response/bulk_transaction"
91
95
  require "pokepay_partner_ruby_sdk/response/bulk_transaction_job"
92
96
  require "pokepay_partner_ruby_sdk/response/paginated_bulk_transaction_job"
@@ -114,6 +118,11 @@ require "pokepay_partner_ruby_sdk/response/campaign"
114
118
  require "pokepay_partner_ruby_sdk/response/paginated_campaigns"
115
119
  require "pokepay_partner_ruby_sdk/response/account_transfer_summary_element"
116
120
  require "pokepay_partner_ruby_sdk/response/account_transfer_summary"
121
+ require "pokepay_partner_ruby_sdk/response/organization_worker_task_webhook"
122
+ require "pokepay_partner_ruby_sdk/response/paginated_organization_worker_task_webhook"
123
+ require "pokepay_partner_ruby_sdk/response/coupon"
124
+ require "pokepay_partner_ruby_sdk/response/coupon_detail"
125
+ require "pokepay_partner_ruby_sdk/response/paginated_coupons"
117
126
  require "pokepay_partner_ruby_sdk/response/bad_request"
118
127
  require "pokepay_partner_ruby_sdk/response/partner_client_not_found"
119
128
  require "pokepay_partner_ruby_sdk/response/partner_decryption_failed"