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.
1237 1238 1239 1240 1241 1242 1243 1244 1245 |
# File 'lib/stripe/services/payment_link_service.rb', line 1237 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.
1248 1249 1250 1251 1252 1253 1254 1255 1256 |
# File 'lib/stripe/services/payment_link_service.rb', line 1248 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.
1259 1260 1261 1262 1263 1264 1265 1266 1267 |
# File 'lib/stripe/services/payment_link_service.rb', line 1259 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.
1270 1271 1272 1273 1274 1275 1276 1277 1278 |
# File 'lib/stripe/services/payment_link_service.rb', line 1270 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 |