Class: PayPal::SDK::REST::DataTypes::WebProfile
Constant Summary
Core::API::DataTypes::Base::ContentKey, Core::API::DataTypes::Base::HashOptions
Instance Attribute Summary
Attributes inherited from Base
#error, #header, #request_id
Class Method Summary
collapse
Instance Method Summary
collapse
#api, api, #error=, included
Methods included from SetAPI
#client_id=, #client_secret=, #set_config, #token=
Methods inherited from Base
#http_header, #merge!, #raise_error!, raise_on_api_error, #success?
add_attribute, add_member, array_of, #convert_array, #convert_object, define_alias_methods, #hash_key, #initialize, #member_names, members, #members, #merge!, object_of, #set, #skip_value?, snakecase, #to_hash, #value_to_hash
#log_event, #logger, logger, logger=
Class Method Details
.find(resource_id) ⇒ Object
2441
2442
2443
2444
2445
|
# File 'lib/paypal-sdk/rest/data_types.rb', line 2441
def find(resource_id)
raise ArgumentError.new("id required") if resource_id.to_s.strip.empty?
path = "v1/payment-experience/web-profiles/#{resource_id}"
self.new(api.get(path))
end
|
.get_list(options = {}) ⇒ Object
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
|
# File 'lib/paypal-sdk/rest/data_types.rb', line 2447
def get_list(options = {})
path = "v1/payment-experience/web-profiles/"
l = api.get(path, options)
l.map { |x| WebProfileList.new(x) }
end
|
.load_members ⇒ Object
2398
2399
2400
2401
2402
2403
2404
2405
|
# File 'lib/paypal-sdk/rest/data_types.rb', line 2398
def self.load_members
object_of :id, String
object_of :name, String
object_of :temporary, Boolean
object_of :flow_config, FlowConfig
object_of :input_fields, InputFields
object_of :presentation, Presentation
end
|
Instance Method Details
#create ⇒ Object
2409
2410
2411
2412
2413
2414
|
# File 'lib/paypal-sdk/rest/data_types.rb', line 2409
def create()
path = "v1/payment-experience/web-profiles/"
response = api.post(path, self.to_hash, )
self.merge!(response)
WebProfile.new(response)
end
|
#delete ⇒ Object
2431
2432
2433
2434
2435
2436
|
# File 'lib/paypal-sdk/rest/data_types.rb', line 2431
def delete()
path = "v1/payment-experience/web-profiles/#{self.id}"
response = api.delete(path, {})
self.merge!(response)
success?
end
|
#partial_update(patch_request) ⇒ Object
2423
2424
2425
2426
2427
2428
2429
|
# File 'lib/paypal-sdk/rest/data_types.rb', line 2423
def partial_update(patch_request)
patch_request = PatchRequest.new(patch_request) unless patch_request.is_a? PatchRequest
path = "v1/payment-experience/web-profiles/#{self.id}"
response = api.patch(path, patch_request.to_hash, )
self.merge!(response)
success?
end
|
#update ⇒ Object
2416
2417
2418
2419
2420
2421
|
# File 'lib/paypal-sdk/rest/data_types.rb', line 2416
def update()
path = "v1/payment-experience/web-profiles/#{self.id}"
response = api.put(path, self.to_hash, )
self.merge!(response)
success?
end
|