Class: WebPay::ChargeListRequest
- Defined in:
- lib/webpay/data_types.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Class Method Summary collapse
Instance Method Summary collapse
-
#count ⇒ Object
attributes accessors.
- #count=(value) ⇒ Object
- #created ⇒ Object
- #created=(value) ⇒ Object
- #customer ⇒ Object
- #customer=(value) ⇒ Object
-
#initialize(hash = {}) ⇒ ChargeListRequest
constructor
A new instance of ChargeListRequest.
- #offset ⇒ Object
- #offset=(value) ⇒ Object
- #query_params ⇒ Object
- #recursion ⇒ Object
- #recursion=(value) ⇒ Object
- #request_body ⇒ Object
- #shop ⇒ Object
- #shop=(value) ⇒ Object
Methods inherited from Entity
Constructor Details
#initialize(hash = {}) ⇒ ChargeListRequest
693 694 695 696 697 |
# File 'lib/webpay/data_types.rb', line 693 def initialize(hash = {}) hash = normalize_hash(hash) hash['created'] = hash['created'].is_a?(Hash) ? WebPay::CreatedRange.new(hash['created']) : hash['created'] @attributes = hash end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
676 677 678 |
# File 'lib/webpay/data_types.rb', line 676 def attributes @attributes end |
Class Method Details
.create(params) ⇒ Object
683 684 685 686 687 688 689 690 691 |
# File 'lib/webpay/data_types.rb', line 683 def self.create(params) return params if params.is_a?(self) hash = case params when Hash; params else raise WebPay::InvalidRequestError.new("#{self} does not accept the given value", params) end self.new(hash) end |
.fields ⇒ Object
678 679 680 |
# File 'lib/webpay/data_types.rb', line 678 def self.fields ['count', 'offset', 'created', 'customer', 'recursion', 'shop'] end |
Instance Method Details
#count ⇒ Object
attributes accessors
718 719 720 |
# File 'lib/webpay/data_types.rb', line 718 def count attributes['count'] end |
#count=(value) ⇒ Object
722 723 724 |
# File 'lib/webpay/data_types.rb', line 722 def count=(value) attributes['count'] = value end |
#created ⇒ Object
734 735 736 |
# File 'lib/webpay/data_types.rb', line 734 def created attributes['created'] end |
#created=(value) ⇒ Object
738 739 740 741 |
# File 'lib/webpay/data_types.rb', line 738 def created=(value) value = value.is_a?(Hash) ? WebPay::CreatedRange.new(value) : value attributes['created'] = value end |
#customer ⇒ Object
743 744 745 |
# File 'lib/webpay/data_types.rb', line 743 def customer attributes['customer'] end |
#customer=(value) ⇒ Object
747 748 749 |
# File 'lib/webpay/data_types.rb', line 747 def customer=(value) attributes['customer'] = value end |
#offset ⇒ Object
726 727 728 |
# File 'lib/webpay/data_types.rb', line 726 def offset attributes['offset'] end |
#offset=(value) ⇒ Object
730 731 732 |
# File 'lib/webpay/data_types.rb', line 730 def offset=(value) attributes['offset'] = value end |
#query_params ⇒ Object
705 706 707 708 709 710 711 712 713 714 |
# File 'lib/webpay/data_types.rb', line 705 def query_params result = {} copy_if_exists(@attributes, result, 'count', 'query_params'); copy_if_exists(@attributes, result, 'offset', 'query_params'); copy_if_exists(@attributes, result, 'created', 'query_params'); copy_if_exists(@attributes, result, 'customer', 'query_params'); copy_if_exists(@attributes, result, 'recursion', 'query_params'); copy_if_exists(@attributes, result, 'shop', 'query_params'); return result end |
#recursion ⇒ Object
751 752 753 |
# File 'lib/webpay/data_types.rb', line 751 def recursion attributes['recursion'] end |
#recursion=(value) ⇒ Object
755 756 757 |
# File 'lib/webpay/data_types.rb', line 755 def recursion=(value) attributes['recursion'] = value end |
#request_body ⇒ Object
700 701 702 703 |
# File 'lib/webpay/data_types.rb', line 700 def request_body result = {} result end |
#shop ⇒ Object
759 760 761 |
# File 'lib/webpay/data_types.rb', line 759 def shop attributes['shop'] end |
#shop=(value) ⇒ Object
763 764 765 |
# File 'lib/webpay/data_types.rb', line 763 def shop=(value) attributes['shop'] = value end |