Class: Stripe::PaymentLinkService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::PaymentLinkService
- Defined in:
- lib/stripe/services/payment_link_service.rb
Defined Under Namespace
Classes: CreateParams, ListParams, RetrieveParams, UpdateParams
Instance Attribute Summary collapse
-
#line_items ⇒ Object
readonly
Returns the value of attribute line_items.
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Object
Creates a payment link.
-
#initialize(requestor) ⇒ PaymentLinkService
constructor
A new instance of PaymentLinkService.
-
#list(params = {}, opts = {}) ⇒ Object
Returns a list of your payment links.
-
#retrieve(payment_link, params = {}, opts = {}) ⇒ Object
Retrieve a payment link.
-
#update(payment_link, params = {}, opts = {}) ⇒ Object
Updates a payment link.
Methods inherited from StripeService
Constructor Details
#initialize(requestor) ⇒ PaymentLinkService
Returns a new instance of PaymentLinkService.
8 9 10 11 |
# File 'lib/stripe/services/payment_link_service.rb', line 8 def initialize(requestor) super(requestor) @line_items = Stripe::PaymentLinkLineItemService.new(@requestor) end |
Instance Attribute Details
#line_items ⇒ Object (readonly)
Returns the value of attribute line_items.
6 7 8 |
# File 'lib/stripe/services/payment_link_service.rb', line 6 def line_items @line_items end |
Instance Method Details
#create(params = {}, opts = {}) ⇒ Object
Creates a payment link.
1290 1291 1292 1293 1294 1295 1296 1297 1298 |
# File 'lib/stripe/services/payment_link_service.rb', line 1290 def create(params = {}, opts = {}) request( method: :post, path: "/v1/payment_links", params: params, opts: opts, base_address: :api ) end |
#list(params = {}, opts = {}) ⇒ Object
Returns a list of your payment links.
1301 1302 1303 1304 1305 1306 1307 1308 1309 |
# File 'lib/stripe/services/payment_link_service.rb', line 1301 def list(params = {}, opts = {}) request( method: :get, path: "/v1/payment_links", params: params, opts: opts, base_address: :api ) end |
#retrieve(payment_link, params = {}, opts = {}) ⇒ Object
Retrieve a payment link.
1312 1313 1314 1315 1316 1317 1318 1319 1320 |
# File 'lib/stripe/services/payment_link_service.rb', line 1312 def retrieve(payment_link, params = {}, opts = {}) request( method: :get, path: format("/v1/payment_links/%<payment_link>s", { payment_link: CGI.escape(payment_link) }), params: params, opts: opts, base_address: :api ) end |
#update(payment_link, params = {}, opts = {}) ⇒ Object
Updates a payment link.
1323 1324 1325 1326 1327 1328 1329 1330 1331 |
# File 'lib/stripe/services/payment_link_service.rb', line 1323 def update(payment_link, params = {}, opts = {}) request( method: :post, path: format("/v1/payment_links/%<payment_link>s", { payment_link: CGI.escape(payment_link) }), params: params, opts: opts, base_address: :api ) end |